Overview
RSS Context Factory for modx CMS (ver. Evolution)
The Snippet displays feeds from custom sources.
Description
In order to use the snippet please follow these proceedings:
- Create a snippet named "rssContext" with the following code :
<?php
/**
* rssContext snippet
* @var $myfeed integer optional Choose a feed to display
* [take a look in rssContext.feeds.php to see the feeds or add new one]
* set to 0 to fetch feeds from a random source
* @var $numFeed integer optional Number of feeds to fetch
* (if not set 10 feeds will be fetched)
* @var $keywords string optional keywords to filter the feeds, each one separated by +
* @var $caching integer optional Enable(1) or disable(0) feed caching default to 1
* @var $cachingPeriod integer optional optional Set caching refresh period in seconds
* How to use :
* call the snippet in the template where you want the news to show up
* Example
* [!rssContext? &feed=`5` &numFeed=`10` &keywords=`computer+games` &caching=`1` &cachingPeriod=`3600`!]
*/
$snipPath = $modx->config['base_path'] . "assets/snippets/";
include_once $snipPath."rssContext/rssContext.inc.php";
$myfeed = isset($myfeed) ? $myfeed : "";
$caching = isset($caching) ? $caching : "1";
$cachingPeriod = isset($cachingPeriod) ? $cachingPeriod : "3600";
$rss = new rssContext($modx,$caching,$cachingPeriod );
$numFeed = isset($numFeed) ? $numFeed : 10;
$keywords = isset($keywords) ? $keywords : "";
return $rss->getFeeds($myfeed,$numFeed,$keywords);
?>
- Extract rssContext.zip to the assests/snippets folder
- Call the snippet in the template where you want the news to show up
Example: [!rssContext? &feed=`5` &numFeed=`10` &keywords=`computer+games`!]
- Set write permissions for the cache folder or set feeds caching to 0.
Version Info
rss Context Factory 1.0.0 for modx released on August 24, 2009. Screenshots
Send us please your showcase screenshots with this snippet.Reviews
Customer Reviews:
There are yet no reviews for this product.
Please log in to write a review.