Printable | Index | Search Help
Telephone: 949 458-3974 M-F 9-5 Pacific
Email

Topics

.

PmWiki > Web Feeds

visitors (intermediate) Web feeds are a convenient mechanism to let visitors be notified of changes to a site. Instead of repeatedly checking RecentChanges every day to see what is new, a visitor can use a news aggregator to quickly see what pages of interest have changed on a site. Web feeds are commonly recognized by terms such as RSS, Atom, and web syndication. They are also the foundation for podcasting.

In its simplest form, web feeds in Pm Wiki are built on WikiTrails. Using a feed action such as ?action=rss or ?action=atom on a trail generates a web feed (often called a "channel") where each page on the trail is an item in the feed. Since the Recent Changes and Site.AllRecentChanges pages are effectively trails, one can easily get an RSS feed for a group or site by simply adding ?action=rss to the url for a Recent Changes page. For example, to get the site feed for pmwiki.org, one would use

    http://www.pmwiki.org/wiki/Site/AllRecentChanges?action=rss

Authors can also create custom feeds by simply creating a wiki trail of the pages they want included in the feed. Feeds can also be generated from groups, categories, and backlinks, and the order and number of items in the feed can be changed using options in the feed url. Thus, one can obtain a feed for the Skins category (sorted with most recent items first) by using

    http://www.pmwiki.org/wiki/Category/Skins?action=rss&order=-time

Pm Wiki is able to generate feeds in many formats, including RSS 2.0 (?action=rss), Atom 1.0 (?action=atom), and RSS 1.0 (?action=rdf). In addition, although it is not normally considered a web feed, Pm Wiki can generate metadata information using the Dublin Core Metadata extensions (?action=dc).

How to read a Pm Wiki syndicated feed

  1. You'll need a news aggregator, which is a piece of software designed to read news feeds. Many different news aggregators are available. Some run on your own computer, either on their own or as plugins for email clients, web browsers, or newsreaders. Others are web applications that you can use from any internet-connected computer. Some are in between (technically web applications, but ones designed to run on your computer, not some remote server). Get one that you like.
  2. Subscribe to the WikiTrail you desire by supplying the feed url to the aggregator. The feed url will be the name of a trail page with ?action=rss or ?action=atom added to the end of the url.

Feed options

Add any of the following options to the end of a Pm Wiki web feed url to change its output:

?count=n
Limit feed to n items
?order=-time
Display most recently changed items first
?trail=page
Obtain items from trail on page
?group=group
Limit feed to pages in group
?link=page
Create feed from pages linked to page
?list=normal
Exclude things like Recent Changes, All Recent Changes?, etc.

authors (intermediate)

Configure Pm Wiki for feeds

This section describes how to syndicate portions of a wiki to appear in a web feed. It does not describe how to display a web feed within a wiki page -- for that, see Cookbook:RssFeedDisplay.

To enable web feed generation for a site, add one or more of the following to a local customization file:

    if ($action == 'rss') include_once('scripts/feeds.php');
    if ($action == 'atom') include_once('scripts/feeds.php');
    if ($action == 'rdf') include_once('scripts/feeds.php');
    if ($action == 'dc') include_once('scripts/feeds.php');

or

    if ($action == 'rss' || $action == 'atom' || 
          $action == 'rdf' || $action == 'dc') 
        include_once('scripts/feeds.php');

See Also

<< MailPosts | Documentation Index | RefCount >>

How can I use the RSS <enclosure> tag for podcasting?

For podcasting of mp3 files, simply attach an mp3 file to the page with the same name as the page (i.e., for a page named Podcast.Episode4, one would attach to that page a file named "Episode4.mp3"). The file is automatically picked up by ?action=rss and used as an enclosure.

The set of potential enclosures is given by the $RSSEnclosureFmt array, thus

$RSSEnclosureFmt = array('{$Name}.mp3', '{$Name}.wma', '{$Name}.ogg');

allows podcasting in mp3, wma, and ogg formats.


This page may have a more recent version on pmwiki.org: PmWiki:WebFeeds, and a talk page: PmWiki:WebFeeds-Talk.

.

Page last modified on March 15, 2006, at 10:32 AM .
All material © Copyright 1999-2015, Annie Hall and GardenDesigns.com. ALL RIGHTS RESERVED.