sfRSSPlugin - 0.0.1

simple RSS feed creation

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to the Plugins Home

Signin


Forgot your password?
Create an account

Tools

Stats

advanced search
Information Readme Releases Changelog Contribute
Show source

sfRSSPlugin

Overview

Simple plugin to create RSS feeds

Installation

To install:

$ symfony plugin-install http://plugins.symfony-project.com/sfRSSPlugin

or

$ symfony plugin:install sfRSSPlugin

Usage

Enable plugin in ProjectConfiguration.class.php :

    $this->enablePlugins('sfRSSPlugin');

To create your feed create action, where rss would be and add next lines:

$rssCreator=new sfRSSCreator(array('title'=>'Title of your feed'));

   $rssCreator->addArticle('Title of your article', 'It's URL', 'It's description', 'category', 'publication time'); 

//don't forget to send headers
$response=$this->getResponse();
    $response->setContentType('application/rss+xml');

return $this->renderText($rssCreator->getStreamContent());

TODO:

  • header and footer must be in template
  • find bugs

License

For the full copyright and license information, please view the LICENSE file that was distributed with this source code.