This article explains how to add the “Infobox” template to your MediaWiki installation. It is primarily intended for people who have installed v1.23 from source.
This is an updated version of this older post about setting up Infobox on earlier versions of MediaWiki. It is basically the same but has been modified to be suitable for the current (at the time of writing) version of MediaWiki, v1.23. Please see the older post for more info and background as well as helpful commentary from other users in different circumstances.
Here are the basic steps necessary to add working Infoboxes to a freshly installed version of MediaWiki. Note that the original steps required the install of ParserFunctions; this is no longer required as it ships with recent versions of MediaWiki by default.
- Download the Scribuntu extension into your extensions folder and add it to your LocalSettings.php as described in the ‘Installation’ section.
- Copy the CSS required to support the infobox from Wikipedia.org to your Wiki. The CSS is available in Common.css. You’ll probably need to create the stylesheet – it will be at http://your_wiki/wiki/index.php?title=MediaWiki:Common.css&action=edit – and then you can just copy/paste the contents in there. (I copied the whole file; you can probably just copy the infobox parts.)
- Export the Infobox Template from the Wikipedia.org:
- Go to Wikipedia’s Special:Export page
- Leave the field for ‘Add pages from category’ empty
- In the big text area field, just put in “Template:Infobox”.
- Make sure the three options – “Include only the current revision, not the full history”, “Include templates”, and “Save as file” – are all checked
- Hit the ‘Export’ button; it will think for a second then spit out an XML file containing all the Wikipedia Templates for the infobox for you to save to your PC.
- Now you have the Template, you need to integrate them into your MediaWiki instance. Simply go to your Import page – http://your_wiki/wiki/index.php/Special:Import – select the file and then hit ‘Upload file’.
- With the Templates and styles added you should be able to now add a simple infobox. Pick a page and add something like this to the top:
|title = An amazing Infobox
|header1 = It works!
|label2 = Configured by
|data2 = trog
|label3 = Web
|data3 = [http://trog.qgl.org trog.qgl.org]
- Save, and you should end up with something that looks like this: