Even though your stock MediaWiki setup has included everything and a kitchen sink, there are things it won't do right out of the box - that's where MediaWiki's rather long list of extensions comes to play.

Not everything there is stable, works with current versions of wiki engine and some even pose a security risk, but still you get a lot to choose from.

Starting with rather basic ones like Emoticons (replaces text smilies with graphics, forum-style) and FlashMP3 (plays MP3-files using an embedded Flash applet), it lets you get deep down into authentication (OpenID, LDAP etc), administration (Farmer, PageSecurity) and WYSIWYG-editing (Wikiwyg, wikEd).

But any of these extensions, however simple or complicated, are basically the same in terms of installation. And today I'll show you how it's done.

Let's start with a simple case of integrating RSS feeds into the content of your Wiki pages. As there are several different RSS extensions, I'll narrow it down to just one - SimplePie. You will see below that the name really speaks for itself - installation is simple as a pie!

  1. Grab the latest versions of SimplePie PHP library and accompanying MediaWiki extension:

    $ curl -o simplepie_1.0beta3.zip http://simplepie.org/downloads/simplepie_1.0beta3.zip
    $ curl -o simplepie_mediawiki.zip http://simplepie.org/downloads/simplepie_mediawiki.zip
    
  2. Unarchive:

    $ unzip simplepie_1.0beta3.zip
    $ unzip simplepie_mediawiki.zip
    
  3. Move required files into extensions/ folder of your MediaWiki site:

    $ mv "SimplePie 1.0 Beta 3/simplepie.inc" simplepie_mediawiki.php /path/to/wiki/extensions/
    
  4. Create a cache/ subfolder inside extensions/ folder and make it writable by web-server process user and group (depending on your server's configuration you may have to substitute 770, 755, 750 or some other mode in place of 775 below):

    $ mkdir /path/to/wiki/extensions/cache/
    $ chmod 775 /path/to/wiki/extension/cache
    
  5. Now here's the key part - open LocalSettings.php file in your favorite text editor and add the following text just above the last line ( ?> ) to call the extension:

    include ('extensions/simplepie_mediawiki.php');
    
  6. Save the file and then proceed to edit some Wiki page on your site. Add this line somewhere around the page and click "Show preview" (you may replace URL with any other feed you like): http://www.2sheds.ru/blog/feed.rss

If you see that the preview shows the feed contents, then it's all set - you can check out the documentation of SimplePie extension to see all the parameters like number of items shown etc.

N.B. You may, however, have problems. If you, upon clicking "Show preview" or "Save page", see a line of dash-separated letters and numbers ending with the word "QINU" in place of the feed's content (you may have this problem with other extensions as well, so you shall read this as "in place of the extensions' output"):

          -feed-00000001-QINU

        

then you've run into the notorious UNIQ/QINU bug. If your server runs PHP 5.x, you shall try this solution: as it appears, PHP's Zend engine might be running in so-called compatibility mode (i.e. PHP 5.x trying to be PHP 4.x). To switch it back to normal mode, add this line to .htaccess file in your wiki's directory:

          php_flag zend.ze1_compatibility_mode = Off

        

Now head back to your wiki's page preview, paste the <feed>..</feed> portion in place of QINU line and click "Show preview" one more time - if all is well, feed's content should finally be there.

Well, that was it. Easy as a pie, what do you think? Ah, well, not really - but there are some pretty lengthy cake recipes as well, no? But anyway, I hope you've made it through with me holding your hand - if not, feel free to leave your comments here, I'll try to help you to the best of my abilities.

And next time let's try something a bit more complex - we'll add an OpenID based-authentication to your wiki using an extension of the same name.