about standards, webdesign, usability and open source

Nucleus RSS/Atom Reader 0.10

My second Nucleus plugin, a complete RSS/Atom parser that reads the headlines from the feeds you want to feature on your blog. It can handle RSS0.9, RSS1.0, RSS2.0 and Atom feeds, even when combined with RDF and complex namespaces.

It outputs the contents of the feed as regular list containing links. It is, of course, possible to completely customize it and style it using CSS. There are also options to show a header, either from the feed itself, or one that you provided yourself and to set a maximum number of entries that should be shown. As of version 0.9.4 it is also possible to cut the title off after a preset number of characters and to start displaying items after an offset. For example, it is possible to show only 5 items, starting with item number 10.

The feeds that are parsed are cached, to ensure the website providing the feed isn’t sending unnecessary data evertime somebody visits your site. It is also possible to change the maximum age of a cached feed. In addition to this, RSS/Atom Reader 0.9.5 now also provides support for ETag headers, which will lead to a reduction in bandwidth usage when the cache is expired, but the feed does not contain any new items.


How to install it

Download the file XMLPlugins.zip, extract the files and place them into the plugins folder of your nucleus installation. Go to the management console and the plugin section. First of all, install XMLSupport and finally install RSSAtom.

The two plugins should appear in the list of currently installed plugins. In this list you can also edit the options of these plugin.

To actually use the plugin you must edit the skin of your blog. Simply include, in a convenient place the skin var <%RSSAtom(feedurl)%>. Nucleus will then replace this with the contents of the feed.

Optional other parameters are:
The startat parameter is used to specify at which item the box will start to display entries. For example, if it is set to 0 it will start at the top, if it is set at 10 it will skip the first 10 items. The items parameter must be a number and it will determine the maximum number of items that are shown for this particular feed. The title parameter can contain any string and will be used as the title of this particular feed, if no one is provided in the feed. The usetitle parameter must be either yes or no and will determine if the supplied title will always be used, even if one is provided in the feed.

9 Responses to “Nucleus RSS/Atom Reader 0.10”

  1. Roel wrote on October 29th, 2004 at 8:39 am

    Great going, with all the plugins!

    What spurred you to develop this plugin with NP_NewsFeed [1] already being available? (Or maybe you didn’t know about this plugin? I guess that could be the reason)

    (fyi, there’s also an RSS item plugin [2] )

    [1] http://wakka.xiffy.nl/NewsFeed
    [2] http://wakka.xiffy.nl/RSSIt

  2. rakaz wrote on October 29th, 2004 at 9:37 am

    Hi Roel,

    The reason I wrote this plugin is simple. I needed a RSS/Atom class for the XBEL Reader plugin. I initially wrote RSS/Atom plugin as a test platform for the class. After seeing how it performed I decided to make it also available for download, because it offer a couple of advantages over the old NewsFeed plugin, most notably Atom support and more extended customization.

    Another feature, which NewsFeed does not support is combining multiple feeds and sorting them according to date. Basically it shows the headlines of your favorite sites in one little box on your website. RSS/Atom Reader should support this soon. It already works in my development version.

  3. Anonymous wrote on October 30th, 2004 at 3:57 am

    Beautiful site. Love it.

  4. Roel wrote on November 2nd, 2004 at 8:53 am

    Right. Atom support is great! ;)

    (I sorta missed that somehow. Must have forgotten to have some more coffee that morning)

  5. JohnHeart wrote on November 9th, 2004 at 5:57 pm

    This version 1.01 is OK except that it takes too long to load for my homepage where I put the RSS plugin. Please check my site.

  6. JohnHeart wrote on November 11th, 2004 at 7:13 pm

    Do I need to make a directory for caching? Or if I set the plugin to /cache it will automatically cache file to http://www.mydomain.com/med… Thanks.

  7. rakaz wrote on November 12th, 2004 at 4:03 pm

    JohnHeart: The directory needs to exist and needs to be writable by PHP. Otherwise it simply cannot store the cache and it will retrieve the feed everytime the page on which the plugin is used is loaded by a user.

  8. JohnHeart wrote on November 12th, 2004 at 9:20 pm

    The cache file is always saved at /cache folder even when I made a /tmp folder and made it a default folder in xmlsupport plugin setting.

    I’ve got 42 syndicated feeds and just kill my page empty. The moment I refreshed the page is the only time the contents appear.

  9. Jane Tate wrote on March 13th, 2006 at 8:29 pm

    How would one code the sidbar.inc file if you wanted to include different RSS feeds on different category pages? My site has 2 blogs, so this would be for blog=1.