Sunday, February 11, 2007

Displaying RSS and Atom Feeds in MediaWiki

I used SimplePie to display Blogger atom feeds in Media Wiki (using the ancient 1.5.2 version). Here's an example:

To add another feed, all you need to do is edit a page and add this:


(Replacing chembiogrid's atom.xml with the alternative feed URL).

More info is here: It is as easy as advertised. See particularly here: Or just google "simplepie mediawiki".

Avoid Magpie RSS. I spent the whole afternoon trying to get it to work with Atom with no luck. SimplePie worked in about 5 minutes.


jay said...

I'm trying to get simple pie to post just the titles and the dates of blog posts on a different page. Still working on it. Do you already have code that does this?

Marlon Pierce said...

I didn't do anything special to get it to work, just followed the instructions. You need to do two things:

1. Edit MediaWiki's LocalSettings.php to add the following near the bottom:
# Include the XFeeds reader for Magpierss.

2. Put XFeeds.php and simplepie_mediawiki.php in the extensions/ directory. Make sure they are readable by the Apache server (chmod 755 if using Unix/Linux).

The XFeed tags themselves can then be added to a mediawiki page like so:


Marlon Pierce said...

Sorry, ignore 1/2 of the earlier comment. The XFeeds stuff was from my earlier fooling around with MagpieRSS. You just need simplepie_mediawiki.php, and the <feed/> tag is from SP, not XFeeds.

To show just the dates and titles, use

<feed showdesc="false" showdate="true">