Extension:WikiArticleFeeds

The WikiArticleFeeds Extension is a MediaWiki extension for converting regular wiki articles into RSS and Atom feeds.


 * Note: This is pretty much the polar opposite of XFeed

Please see the official project homepage for up-to-date installation notes, usage tips and advanced features.


 * Project Homepage: WikiArticleFeeds Extension - Jimbojw.com
 * Source Code: WikiArticleFeeds
 * Licensing: WikiArticleFeeds is released under The MIT License.

Installation

 * 1) Download WikiArticleFeeds, and be sure to rename the downloaded file to WikiArticleFeeds.php.
 * 2) Drop this script in $IP/extensions
 * Note: $IP is your MediaWiki install dir.
 * 1) Enable the extension by adding this line to your LocalSettings.php: require_once('extensions/WikiArticleFeeds.php');

Configuration (optional)

If you'd like to disable the default link interpretation behavior (see the example), you can do so by adding this to your LocalSettings.php: $wgForceArticleFeedSectionLinks = true;

Usage
Once installed, editors of your wiki may begin feeding pages immediately, no further system configuration is required.

The extension registers three tags:
 * &lt;startFeed&gt; (Required) - Denotes the beginning of an article segment containing feed data.
 * &lt;endFeed&gt; (Required) - Denotes the end of a feed data segment.
 * &lt;feedBurner&gt; (Optional) - Specifies that FeedBurner is to serve the feed, rather than publishing it directly.

If an article contains a feed section, links titled 'RSS' and 'Atom' will appear in the Toolbox. Additionally, because the appropriate &lt;meta&gt; tags are supplied, your browser may show a feed icon in the address bar.

Note: In the Monobook (default) skin, the Toolbox is in the left-hand sidebar column, towards the bottom.

As mentioned before, a feed section is delimited by the &lt;startFeed /&gt;</tt> and &lt;endFeed /&gt;</tt> flags. Note that these are CLOSED tags, and are functionally equivalent to &lt;startFeed&gt;&lt;/startFeed&gt;</tt> and &lt;endFeed&gt;&lt;/endFeed&gt;</tt> respectively.

The &lt;feedBurner&gt;</tt> tag, when specified, MUST HAVE a single attribute called 'name'. This is the final URL component of the feedburner.com feed URL. For example, consider the demo site: http://jimbojw.com/wiki/index.php?title=Blog The Atom feed URL for this page is: http://jimbojw.com/wiki/index.php?title=Blog&action=feed This has been mapped via feedburner.com to: http://feeds.feedburner.com/Jimbojwcom-Blog And thus, the following is added to the original article text to complete the circle: &lt;feedBurner name="Jimbojwcom-Blog" /&gt;

Note that using FeedBurner in this fashion does not prevent users from still trying to access the generated feeds directly, but it does change all the links to point to feedburner rather than back to the wiki.

Example
<startFeed />

Description of my feed.

Second Feed Item
Brand New! I just made a new Item!

--Anon 10:12, 8 December 2006 (MST)

First Feed Item
Here is the content for my first item ever.

--Anon 08:42, 4 December 2006 (MST)

<endFeed />

The description for the rendered RSS or Atom feed will be "Description of my feed." The feed will have two items, both authored by "User:Anon</tt>".

To add a new item, simply add a new wiki section between the startFeed and endFeed delimiters. Continuing the previous example:

<startFeed />

Description of my feed.

Third Item
When you get a chance, please check out the Main Page.

--~

Second Feed Item
Brand New! I just made a new Item!

--Anon 10:12, 8 December 2006 (MST)

First Feed Item
Here is the content for my first item ever.

--Anon 08:42, 4 December 2006 (MST)

<endFeed />

Feed item publication dates are determined automatically from standard wiki signatures, so in the above's "Third Item", the "-- ~ </tt>" results in a format which WikiArticleFeeds can parse (as in the first and second items).

Finally, the generated feed item URLs will be links to the matching page section, unless a link is made in the feed item text. In the above, the first two items would link to " </tt>" and "  </tt>", while the third would link to " Main Page </tt>".