Automagic RSS Feed Generator Plugin
Automatically create RSS feeds for your CakePHP app.
A .zip of the plugin is available at http://sandbox.siteamonth.com/demo/rss
1. Download FeedCreator 1.7.2-ppt(http://sourceforge.net/projects/feedcreator/) and put the feedcreator.class.php file in /app/vendors/feedcreator.
2. Download the plugin and unzip the contents to app/plugins. The plugin is called "rss", so make sure there is no conflict with any other controllers/plugins
3. Add this to your /app/config/routes.php:
4. You have to allow permission for the plugin to generate a feed for a particular model. Edit your model to include:
5. The plugin will attempt to find default values for the feed.
If your model includes a field 'title' or 'name' that will be used automatically for the item title.
The fields 'desc', 'description', 'text', 'content' or 'body' will be used for the item description.
The link will be '/{$model}/view/{$model->primaryKey}' by default.
The results will be ordered by 'created' => 'DESC' by default.
The limit is set to 10 by default.
You can override any of these in the model, as well as set conditions for which rows are returned, by replacing the line used in step #5 with:
6. You reach the feed using both the singular and plural model name (post or posts).
1. Download FeedCreator 1.7.2-ppt(http://sourceforge.net/projects/feedcreator/) and put the feedcreator.class.php file in /app/vendors/feedcreator.
2. Download the plugin and unzip the contents to app/plugins. The plugin is called "rss", so make sure there is no conflict with any other controllers/plugins
3. Add this to your /app/config/routes.php:
$Route->connect('/rss/*', array('controller' => 'rss', 'action' => 'feed'));
4. You have to allow permission for the plugin to generate a feed for a particular model. Edit your model to include:
var $feed = true;
5. The plugin will attempt to find default values for the feed.
If your model includes a field 'title' or 'name' that will be used automatically for the item title.
The fields 'desc', 'description', 'text', 'content' or 'body' will be used for the item description.
The link will be '/{$model}/view/{$model->primaryKey}' by default.
The results will be ordered by 'created' => 'DESC' by default.
The limit is set to 10 by default.
You can override any of these in the model, as well as set conditions for which rows are returned, by replacing the line used in step #5 with:
var $feed = array(
'conditions' => array('Post.active' => true),
'titleField' => 'Post.name',
'descField' => 'Post.desc',
'link' => '/post/view/%s',
'orderby' => array('Post.created' => 'DESC'),
'limit' => 10
);
6. You reach the feed using both the singular and plural model name (post or posts).
http://yourapp/rss/modelname
or
http://yourapp/rss/modelnames

If you're using Cake 1.2 use the built in RSS support. This helper was really meant for 1.1
-Matt
I just get a controller missing error. Do I need to declare the plugin in the same way that I do with helpers and components?
I tried to get this info from the manual, but 1.1 is vague and 1.2 is vaguer.
Please help as this plugin is just what I'm looking for.
default value: var $encoding = "ISO-8859-1";
replace with this:
new value: var $encoding = "UTF-8";
in rss.thtml
$rss = new UniversalFeedCreator();
$rss->encoding = "UTF-8";
it's not work, who can help me? thanks.