NP_RSSAtom.php

A complete RSS/Atom parser that reads the headlines from the feeds you want to feature on your blog. It can handle RSS 0.9, RSS 1.0, RSS 2.0 and Atom feeds, even when combined with RDF and complex namespaces.

General Plugin info
Current Version: 0.14
Download: XMLPlugins.zip [272Kb]
Forum Thread: http://forum.nucleuscms.org/viewtopic.php?t=5042
Author: Rakaz

Installing

  1. Unzip the file and upload the contents to your plugin directory
  2. Install the plugin…

How to use the plugin

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 everytime 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.

Additional information is available on Rakaz' weblog.

Available SkinVars and/or TemplateVars

  • <%RSSAtom(http://www.rakaz.nl/nucleus/rss)%>
    Insert an RSS or Atom feed into your weblog.

Other optional parameters are: <%RSSAtom(feedurl,startat,items,title,usetitle)%> 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.

Bugs

The latest version of this plugin contains a rather large charset conversion library. The next version of this plugin will not use this external library anymore, but instead will depend on the iconv or mbstring PHP extension.

History

  • [Version 0.14]
    • Again rewritten large parts of the charset conversion
  • [Version 0.13]
    • Replaced code for charset conversion with faster optimized version
  • [Version 0.12]
    • Added proper support for UTF-8 encoded RSS and Atom feeds
    • Added charset conversion for more exotic feeds
  • [Version 0.11]
    • Changed version number to reflect updated XMLSupport
  • [Version 0.10]
    • Large rewrite of the plugin code
    • Reorganized template settings
    • Now making use of the TEMPLATE class to fill values in templates
  • [Version 0.9.5]
    • Data is now HTML entities encoded
    • Split of parser and cache class to make it reusable by RSS/Atom Aggregator and XBEL Reader
    • Misc bugfixes
  • [Version 0.9.4]
    • Added ability to cut the title after a preset number of chars
    • Added ability to specify an offset to start somewhere in the middle, instead of at the top of the entries
    • Fixed a bug in cache reading, also added extra debug information which can be turned on by setting line 85 to true
  • [Version 0.9.3]
    • Fixed parsing problem with entities in titles and urls
  • [Version 0.9.2]
    • Misc bugfixes in feed parsing
    • Added more template configuration options
    • Added the option to hide retrieval and parsing errors
  • [Version 0.9.1]
    • Added bugfix for Atoms reader
  • [Version 0.9.0]
    • Initial release
rssatom.txt · Last modified: 2006/07/05 13:03 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki