Bloge-Feeds

Summary: Blog-like Atom & RSS feeds
Version: 2009-08-11
Prerequisites: PmWiki 2.2.x
Status: beta
Maintainer: Eemeli Aro
Discussion: Bloge-Feeds-Talk
Categories: Blog, RSS

Description

This is a wrapper for PmWiki's default WebFeeds that makes the output more blog-like, with full-text or extracted item contents and more robust links & time variables.

Bloge-Feeds is a part of Cookbook.Bloge, but may also be used as a standalone recipe.

To install this recipe:

  • download bloge-feeds.phpΔ to your cookbook directory
  • add the following line to a configuration file:
    include_once("$FarmD/cookbook/bloge-feeds.php");

Usage

Follow the instructions as on PmWiki.WebFeeds, except for including this recipe instead of feeds.php as shown above.

Getting a nice URL for the feed will require a little extra configuration. For example, adding the following in the appropriate per-group customization file (here, local/Blog.php) will give you the ten most recently published pages in the group 'Blog' with names that correspond to the given pattern, at an address such as http://example.org/wiki/Blog?action=atom:

if (($action=='rss') | ($action=='atom')) {
  $FeedPageListOpt = array(
    'name' => '????-??-*',
    'order' => '-ctime',
    'count' => 10
  );
  if (empty($_REQUEST['group'])) $_REQUEST['group'] = 'Blog';
  include_once("$FarmD/cookbook/bloge-feeds.php");
}

Manipulating the $_REQUEST array is required, as feeds.php will check it before reading $FeedPageListOpt.

The full text of a page may be reduced to an extract by adding an anchor [[#jump]] to the page. Bloge-Feeds will replace the line it appears on and any subsequent text with a link "Continue reading..." to the page itself.

Notes

The configuration mentioned above in the usage section is left outside the recipe as it is particular to each use case. Bloge, for instance, also uses this recipe to provide a separate feed for the comments of each blog entry.

The use of the description element to hold the RSS 2.0 feed's full page contents is perhaps not semantically correct, but it should be understood by most feedreaders. The Atom feed of course makes use of the appropriate content element.

For implementing feed autodiscovery, take a look at FeedLinks and RSSFeedLink.

Release notes

See also

  • BlogeA bundle of blogging
  • EnhancedWebFeedsEnhances native PM Wiki Feed support.
  • FeedLinksAdd HTML-header links to enable autodiscovery of RSS/Atom feeds.
  • RSSFeedLinkHow to create auto-detect RSS feed links

Contributors

Comments

See discussion at Bloge-Feeds-Talk

User notes +3: If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.