24 mcRSSlist Plugin (en)
May 23, 2005. Tags: WordPress.Description
This plugin generates simple link lists from any RSS feeds.
Specification
- Requires WordPress 1.5+, compatible with 2.0
- Uses
/wp-includes/rss-functions.phpas a backend engine, which is basically based on Magpie RSS, a powerful RSS parser, but nicely hacked by WordPress developers (thanks!) in order to deal cache data in the MySQL database.
- Handles RSS 0.92, 1.0, 2.0 feeds
- Tags to be parsed
- channel - title, link, description
- item - title, link, description, pubDate/dc:date, author/dc:creator
- Timestamps in RFC 822 format (Tue, 10 May 2005 13:19:24 +0000) or W3C/ISO8601 format (2005-04-28T19:25:30+01:00) can be re-formatted into your own style.
- Output style can be selected by $styles parameter.
Download version 0.4 (2006-01-08)
Version History
- 0.1 (2005-05-20) initial release
- 0.1.1 (2005-05-24) minor bug fix
- 0.1.2 (2005-05-26) minor bug fix
- 0.1.3 (2005-06-06) minor bug fix
- 0.2 (2005-09-15) minor optimization, added output style
0.3 (2005-11-22)fixed error handling issue, added feed validation 'dot'- 0.4 (2006-01-08) minor fix
Known Issue
Inappropriate error handling by /wp-includes/rss-functions.php causes php error in such cases as broken feed or feed server down, etc. You will need to tweak /wp-includes/rss-functions.php file in order to fix this issue.
Fixed in WordPress 1.6+. Plugin version 0.3+ also handles this issue in WordPress 1.5.
References:
[3057] (changeset) - WordPress Trac - Trac
#1446 (break when can't get RSS) - WordPress Trac - Trac
Install
- Place the plugin file in
/wp-content/plugindirectry - Activate in Plugins admin page
How to use it
This plugin defines a function mcRSSlist ().
$num_items = 10,
$style = 0,
$ordered = false,
$show_channel_title = true,
$date_format = 'm/d H:i',
$before_channel_title = '<h2>',
$after_channel_title = '</h2>',
$mb_encoding = false);
- $feed_uri - URI for RSS feed
- $num_items - number of item to be displayed. default = 10
- $style - choose output style.
- 0 (default) - Displays 'link to item', 'date', 'creator'. Originally intended to be used in sidebar.
- 1 - Displays 'link to item', 'description', 'creator'. Intended to display del.icio.us links. Sample: http://matopc.myvnc.com/delicious/
- 2 - Displays 'date', 'link to item', 'description', 'creator'. Sample: http://matopc.myvnc.com/antenna/
- 3 - Displays only 'link to item'.
- $ordered (boolean) - Wrap link items with <ul> (false) or <ol> (true) tags
- $show_channel_title - Display channel title with a link to the channel page wrapped with $before_channel_title (default '<h2>') and $after_channel_title (default '</h2>').
- $date_format - Format of the date. Uses php date () function.
- $mb_encoding - Uses PHP
mb_convert_encoding ()to convert feed items into WordPress charset defined inget_settings('blog_charset'). Just in case you need.
Examples
Displays 'matopc :: blogrolling' as shown in sidebar of the main page.
<?php mcRSSlist ('http://r.hatena.ne.jp/matopc/rss', 15); ?>
</li>
My del.icio.us page uses style 1.
Advanced Settings
Cache age
define('MAGPIE_CACHE_AGE', 60*60);
Cache data are stored in wp_options table in the MySQL database.
Output Style
switch ($style) {
case 0: // default sidebar style
$RSSlist .= $itemTitle . '<br /> ' . $itemDate . ' by ' . $itemCreator;
break;
case 1: // del.icio.us style.
$RSSlist .= $itemTitle . ' - ' . $itemDescription . ' by ' . $itemCreator;
break;
case 2: // antenna style
$RSSlist .= $itemDate . " » " . $itemTitle;
break;
case 3: // your style - now simple
$RSSlist .= $itemTitle;
break;
} // end switch - STOP EDITING
Styles are defined here. You can edit here using variables $itemTitle (with link), $itemDescription, $itemDate, $itemCreator.
Acknowledgement
I appreciate developers of WordPress, Magpie RSS and RSS Fetched Link List plugin (that I used before). Thanks.


Great!
I'm using it on my weblog.
tks.
Thank you for using my first WordPress plugin.
I updated the plugin (to v0.1.3) that was lacking quotations for the channel link URI.
Thanks.
:lol::lol: great!
Great plugin! I would like to have it filter the RSS entries based on whether they include a search parameter. Is there an easy way to do this?
Hi Steve,
Thanks for using my plugin.
Hi Jim,
> I would like to have it filter the RSS entries
Interesting. I'm now wondering if php functions like
array_filtercould not be a simple solution for this. Please stay tuned, as comment feed is working now.Thanks.
Thanks for looking into the filter idea. How would I implement array_filter?
Hi!
It's a cool plugin. However, I think it has some issues with Wordpress 2.0. Plz tell me if it's just me making some error or if it's the plugin.
Japhy
Hi Japhy,
Thanks for trying out my plugin. Ver 0.3 works OK in my internal WP2.0 site. Can you tell me more about the errors that you see?
Thank you.
When I enable version mcRSSlist 0.3 under WordPress 2.0 I get an error like this:
Warning: Cannot modify header information - headers already sent by (output started at /var/www/wp2test/wp-content/plugins/mcRSSlist.php:169) in /var/www/wp2test/wp-admin/plugins.php on line 16
Do you know what this means?
Hi Jim and Japhy,
I found I had put an old(er) file on the server. Sorry about that!
Now I labeled the latest plugin as ver 0.4 that includes fix for a typo..
Thank you guys for the comments.
Thank you very much for this uselful plugin - I've had it running on my wordpress installation for many months now. After having updated to WP 2 and the latest version of mcRSSlist, however, my linkfeed is not displayed any longer. Grateful for any hint that might change this! - My linkfeed: http://www.heilmile.de/weblinks/rss.php
Hi Matthias,
Activating debug process in rss-functions.php, fetch_rss() seems getting error 400 from your server.
Didn't this happen in WP 1.5? If so checking into rss-functions.php revisions may be a good way to go...
THanks for your quick reply - no, this did not happen in 1.5 - being quite challenged as for coding, however, I feel pretty unable to solve the problem...
I've sorted it out - partly... - updating WP's rssfunctions.php and carefully editing your plugin, my feed is displayed again. The only thing is that it does not update its content. Any more clue?-)
Hi Matthias.
Displayed is good! Update -- Isn't it because of cache? You could turn off the cache defined in the plugin file for testing. Default is 1 hr (60*60 sec).
define ('MAGPIE_CACHE_AGE', 0);BTW your site is beautiful. Thanks.
Thanks again... - no, the problem still persists. The thing is that my feed http://www.heilmile.de/weblinks/rss.php has newer postings in it than there are displayed under mcRSSlist. I've upgraded rss-functions.php but this does not change the problem. - Grateful for help again...:roll: