yii-feed-widget This widget reads a a specified rss feed and displays feed entries in a view.

  1. Requirements
  2. Usage
  3. Resources

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

1 0
18 followers
2 569 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: Web Service
Developed by: Richard Walker
Created on: Aug 5, 2012
Last updated: 12 years ago

Downloads

show all

Related Extensions