Yii 1.1: yii-feed-widget

This widget reads a a specified rss feed and displays feed entries in a view.
18 followers

This widget uses SimplePie php library to read a given feed, process it and output it on a page. Some basic css has been specified to lay the widget out in 3 columns but the intention is that it mostly dumps the html into the page ready for styling.

The widget loads the feed in with Ajax so as not to hold up other page loading activities.

Requirements

Tested on Yii 1.1.11

Usage

  1. Copy the files into the extensions directory

  2. In your main site config (main.php) file you must add an entry in controllerMap

'controllerMap'=>array(
     'YiiFeedWidget' => 'ext.yii-feed-widget.YiiFeedWidgetController'
),
  1. Use the widget in a view specifying the url of the feed to grab and the number of items to grab from the feed. (0 for all items)

eg.

<!-- Feed widget -->
<?php 
$this->widget(
   'ext.yii-feed-widget.YiiFeedWidget',
   array('url'=>'http://www.mysite.com/feed','limit'=>3)
); 
?>

Resources

Uses SimplePie php library for feed processing http://simplepie.org/

SimplePie depends on IDNA Convert (idna_convert.class.php) http://www.phpclasses.org/browse/file/5845.html

Total 10 comments

#14998 report it
fouss at 2013/09/27 11:14am
I want to use 2 url

What to do if you want feed from to urls?

#13830 report it
The Peach at 2013/06/29 01:18pm
can't load two widgets at the same time

Hi, thank you for your library. It looks like that if you load two extensions on the same page it'll fail load the second one.

#12172 report it
jon boy at 2013/03/04 08:33am
Is paging supported

Would be nice if it does not exist to page the blog results

#10252 report it
Sage Gerard at 2012/10/14 12:02pm
404 on YiiControllerAction with controller map

I am also stuck on the spinner, and the permissions on relevant directories are fine.

I have added the controllerMap configuration, but the hidden fields in the view linking to YiiFeedWidget/getFeed return 404. The code looks fine on first glance. Any ideas on where else to look?

#10106 report it
andyofb at 2012/10/04 10:15am
Loading spinner

I have the same issues with this feed http://www.nasa.gov/rss/

FIXED

cache dir was not writable.

#9669 report it
Richard Walker at 2012/09/02 12:05pm
re: Extension Can't Run, re:Enhancement request

@144key Are you using version 1.01? If you are using 1.0 you could have case issues depending on what platform you are on. Also, are you certain the RSS feed you are parsing works properly and validates in an RSS validator?

@alanselvam Thanks for the feedback. Sorry, I don't have time to extend the plugin in the way you request at the moment.

#9666 report it
144key at 2012/09/02 09:27am
Extension Can't Run

I've follow all instructions and when loaded, its always loading (there is loader icon/gif showed) and rss content not shown.

Anyone can solve this problem ?

Thanks before :)

#9462 report it
alanselvam at 2012/08/13 09:30am
Enhancement request

I am new to yii. can u enhance this extension to parse RSS feed and store feed content in Database. It will really help me.

#9374 report it
Richard Walker at 2012/08/07 09:54am
No problem

@Txomin Thanks for the feedback :)

#9373 report it
Txomin at 2012/08/07 09:40am
Thanx

Have been looking for something like this for a while. Much appreciated.

Leave a comment

Please to leave your comment.

Create extension