EnhancedWebFeeds

Summary: Enhances native PM Wiki Feed support.
Version: 0.1a
Prerequisites:
Status: beta
Maintainer: Ausimage
Categories: Blog RSS

Description

Enhances native PM Wiki Feed support by adding tags to define item descriptions. It adds markup to designate a description for each item, as well as a template for additional tags.

Installation

1. Download the Enhanced Web Feeds fileΔ and place it in your cookbook directory.

2. Add the following to your config.php file:

## Enable RSS and Atom web feeds.
if ($action == 'rss') {
    include_once($FarmD."/scripts/feeds.php");
    // Load Enhanced Feed script
    include_once($FarmD."/cookbook/EnhanceWebFeeds.php");
    // Reset Feed tags for Blog feed
    $FeedFmt['rss']['feed']['title'] = $WikiTitle;
    $FeedFmt['rss']['feed']['copyright'] = 'copyright';
    $FeedFmt['rss']['feed']['description'] = 'a description';
    // Reset Item tags for Blog feed
    $FeedFmt['rss']['item']['title'] = '$Title';
    $FeedFmt['rss']['item']['description'] = 'FeedTextSection';
    $FeedFmt['rss']['item']['category'] = 'FeedCategory';
    // Set default values for ?action=rss
    SDVA($_REQUEST, array('group' => 'Blog','order' => '-time',
        'count' => 6,'list' => 'normal',
        'name' => '-SideBar,-HomePage,-Group*,-Comment*,-Post*'));
}

3. Create your entries on a Wiki Page.

  
(:Title A Blog Entry:)
>>rfloat<<
07-15-2007 - 16:47

''[[{$Name}|Link]] | [[{$Name}Comments|Comments]]''
>><<
!!{$Title}
[[<<]]
[[#blog]]
This is a blog entry...
[[#blogend]]
[[<<]]
----
[[!Blog]]

Notes

Description Tag

The RSS item description tag can be filled by either an entire page or a single section.

Full Page: $FeedFmt['rss']['item']['description'] = 'FeedTextPage';

First anchored section: $FeedFmt['rss']['item']['description'] = 'FeedTextSection';

The anchored section is defined by [[#blog]] ... [[#blogend]], which can also be modified by adding a regular expression value to $BE_PageSection in your RSS feed configuration which will define new section markup to surround the include.

Category Tag

Setting $FeedFmt['rss']['item']['category'] = 'FeedCategory'; in your RSS feed configuration enables native PM Wiki categories to be passed through to the RSS Item Category tag.

Release Notes

If the recipe has multiple releases, then release notes can be placed here. Note that it's often easier for people to work with "release dates" instead of "version numbers".

See Also

Contributors

Ausimage

Comments

See discussion at EnhancedWebFeeds-Talk

User notes +1: 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.