Extension:ToFeed

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual - list
Crystal Clear action run.png
ToFeed

Release status: beta

Implementation Page action
Description Returns an article as a RSS feed
Author(s) Sylvain LerouxTalk
Last version 1.2b (2010-11-30)
MediaWiki 1.12.0
PHP 5.1 (with support for XSLT)
License GPL
Download http://www.chicoree.fr/pub/mediawiki/ToFeed-1.2b.tar.gz
Example
Hooks used
UnknownAction

BeforePageDisplay

Check usage (experimental)

Contents

[edit] What can this extension do?

This extension add a new action that returns a page as an RSS feed.

The first list found in the article will be used to build the feed. Usually, this is the table of contents. By disabling toc generation (__NOTOC__) or by providing a list before the generated toc, one may be able to export any other list in the feed. Useful for pages that contains a list of links.

In addition, starting from 1.2b, ToFeed when invoked on a category page will return the list of articles in that category if the category page does not contain any other list of links.

The main advantage of ToFeed is that it does not require any change in the content of the article (i.e.: no special tag to add). Moreover, ToFeed is able to extract the description of the page as the text before the first list – without requiring any special tag. This is why I call it non intrusive feed generator.

The major drawback, is that it is build on top of XSLT. So it requires XSLT support at PHP level. But, this shouldn't be a problem with PHP5 or later. This might also increase the load on your server. Depending on your hit rate, this may or may be not a problem.

[edit] Usage

After this extension has been installed, you may retrieve an article as a RSS feed by appending ?action=tofeed at the end of the URL. The following URLs will allow you to compare the result of using ToFeed on two articles:

http://www.chicoree.fr/w/Derniers_articles?action=tofeed 
http://www.chicoree.fr/w/Derniers_articles
http://www.chicoree.fr/w/Installer_JBoss_AS_5?action=tofeed  
http://www.chicoree.fr/w/Installer_JBoss_AS_5

[edit] Download instructions

  1. Download the latest version from http://www.chicoree.fr/pub/mediawiki.
  2. Expand in your $IP/extensions folder. Note: $IP stands for the root directory of your MediaWiki installation, the same directory that holds LocalSettings.php.

[edit] Installation

To install this extension, add the following to LocalSettings.php:

require_once("$IP/extensions/ToFeed/ToFeed.php");

[edit] See also

There are several other feed generator extensions available for MediaWiki. Please see the category below for a partial list of them.

Personal tools
Namespaces
Variants
Actions
Site
Support
Download
Development
Communication
Print/export
Toolbox