Extension:WikiFeeds

From MediaWiki.org

Jump to: navigation, search
Wikimedia-logo-meta.png

This page was recently moved from MetaWiki.
It probably requires cleanup – please feel free to help out. In addition, some links on the page may be red; respective pages might be found at Meta. Remove this template once cleanup is complete.


       
Manual on MediaWiki Extensions
List of MediaWiki Extensions
Crystal Clear action run.png
WikiFeeds

Release status: stable

Implementation  Special page
Description Enhanced feed support for MediaWiki
Last Version  0.5 (2007-03-12)
MediaWiki  1.5.x, 1.6.x, 1.7.x, 1.8.x, 1.9.x
License No license specified
Download no link

check usage (experimental)

The RSS and ATOM 0.3 feeds coming out of MediaWiki are not robust enough for all individuals. Hence the need for WikiFeeds. WikiFeeds is an alternative feed generator that outputs RSS 2.0 and ATOM 1.0 feeds. It can generate the following feeds:

  • Recent page changes
  • Newest pages
  • Recent changes by user
  • Newest pages by user
  • User watchlist (can be either public or private)
  • Recent changes for articles in a category
  • Newest articles in a category

WikiFeeds is present as a special page. It also inserts itself into the page view process and creates links to the available feeds. For example, when you are on a category page, the appropriate links to the per-category feeds are inserted into the HTML document for feed auto-discovery.

Contents

[edit] Demo

See http://wiki.case.edu/Special:WikiFeeds

[edit] Instructions

Most recent version of source code is available at http://opensource.case.edu/svn/MediaWikiHacks/extensions/WikiFeeds/trunk/SpecialWikiFeeds.php. (This URL seems to be down for good - try WikiFeeds/SpecialWikiFeeds.php and WikiFeeds/GenericXmlSyndicationFeed.php instead. No guarantee of being current.)

Installation directions are located in this source file.

Feeds can be accessed by visiting Special:WikiFeeds in your wiki. This page should show up on the special page list page.

WikiFeeds requires PHP 5 because it makes use of the PHP 5 class constants, the PHP 5 DOM functions, and the PHP SPL.

Newer versions of WikiFeeds have some of the class declarations split off in a separate file, GenericXMLSyndicationFeed.php. This file can be obtained at http://opensource.case.edu/svn/MediaWikiHacks/classes/GenericXmlSyndicationFeed/GenericXmlSyndicationFeed.php. It is recommended to use the most recent version of this file with WikiFeeds.

[edit] Unique Parameter

If you want use the unique parameter change the sql-query in line 468

replace

$sql = "SELECT rev_id AS revid, rev_page AS page, rev_user_text as user, rc_id AS rcid
      FROM $recentchanges, $revision
      WHERE rc_this_oldid=rev_id AND rev_deleted=0
      ORDER BY rev_id DESC LIMIT $count";

by

if ($unique == true) {
	$unique_sql = " AND rc_id=
		(SELECT MAX(rc_id) 
		FROM recentchanges tmp 
		WHERE tmp.rc_cur_id=rc.rc_cur_id) ";
}
$sql = "SELECT rc_id, rev_id AS revid, rev_page AS page, rev_user_text as user, rc_id AS rcid 
	FROM $recentchanges rc, $revision 
	WHERE rc_this_oldid=rev_id AND rev_deleted=0 $unique_sql
	ORDER BY rev_id DESC LIMIT $count;";

[edit] Updates

  • Re-factored to a Special Page on March 22, 2006. (version 0.2)
  • Version 0.4 features a disk-based cache system and the ability to localize messages using the MediaWiki messages system
  • Version 0.5 has private watchlist feeds implemented as well as minor bug fixes.

[edit] Author

WikiFeeds is authored by Gregory Szorc. More information can be found at http://opensource.case.edu/projects/MediaWikiHacks.

[edit] Sites using WikiFeeds

[edit] See also