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 ¶
Copy the files into the extensions directory
In your main site config (main.php) file you must add an entry in controllerMap
'controllerMap'=>array(
'YiiFeedWidget' => 'ext.yii-feed-widget.YiiFeedWidgetController'
),
- 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
Thanx
Have been looking for something like this for a while. Much appreciated.
No problem
@Txomin Thanks for the feedback :)
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.
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 :)
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.
Loading spinner
I have the same issues with this feed http://www.nasa.gov/rss/
FIXED
cache dir was not writable.
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?
Is paging supported
Would be nice if it does not exist to page the blog results
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.
I want to use 2 url
What to do if you want feed from to urls?
widget
Excuse me, I'm new.
I've got this error message :
Thanks if you could help me
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.