Coding Tools, Reviews, and Solutions

Posts Tagged ‘wiki

Installing and Customizing MediaWiki

leave a comment »

Contents

Requirements – MediaWiki

Requirements – Internal

Parts

Skins

Extensions

Preamble

(if you rate this I would like to read your comments about your rating)

Notes on installing MediaWiki on an in-house server and customizing it with extensions and skins.  Windows was my first ‘test’ environment and Linux will be the final residing environment.

Why a wiki? Well, I have installed and initiated the use of a wiki on 4 different occasions.  Not personally but within the corporate environment.  Yea, what does that mean?  It means I saw the value of ‘a’ wiki and knew how useful it could be if it was adopted.  I have used Sharepoint and always felt as if I was having my hands tied everytime I used it due to what seems to be a half-hearted implementation in the wiki area.

Here is what I have used and installed in the past and highly recommend any of them:

MoinMoin - Python based wiki with everything you could ever want in a wiki.

FlexWiki - .Net based wiki which was cool when I used it but seems dead now.

DokuWiki - Php based wiki which is very fast and very complete – probably my favorite after MoinMoin.

Instiki – Rails based wiki I used to build a .Net community at a previous job.  This does not appear to be active but it was pretty cool.

How did I arrive at my decision to use MediaWiki? Well, I have long used WikiMatrix to keep track of the various wikis out there and their features and that’s where I started.  Then I winnowed down the choices until I had about 5 to install and I tried them all and between MediaWiki and DokuWiki as the top contenders MediaWiki was chosen due to is usage as the base for Wikipedia.

Requirements – MediaWiki

These are the requirements that MediaWiki has to get up and running:

  • MediaWiki stack
  • Apache v2
  • Php v5
  • MySql v5

Requirements – Internal

These are the requirements that my company has for using MediaWiki (or any wiki):

  • Text Editing (of course!)
  • Page Locking / Protect
  • Page Templates
  • Versioning – History
  • Image / File Upload
  • Mind Map integration (FreeMind and/or MindMeister)
  • Image Navigation (Image Maps if possible)

Parts

So, here is how I got this going and the reasoning behind some of my choices.  Initially I installed all of the MediaWiki components individually and became discouraged because I wanted to get this up and running quickly and while I am fairly familiar with the LAMP / WAMP stack I am not an expert.  In order to get management interested I had to offer a no cost solution that could be shown to be installed, configured and running quickly.

BitNami saved the day!  Some months ago I was looking at setting up a Joomla! site and, again, I wanted to put my time in things other than installing, configuring, etc. so I turned to Bitnami and discovered that in no time at all I could get Joomla up and running with a full WAMP stack with virtually no trouble at all (unless you count forgetting the various passwords during installation!).  I know, it’s so un-purist of me…oh well, I want to solve problems and and think proving I can hand install and configure and application I need is no longer part of my work ethic.

Anyway, here is the download page for the various BitNami application stacks, infrastructures and server stacks.  Bitnami offers a wide variety of applications as well as _AMP (Linux, Windows, Mac) stacks that include, for example: PHP, MySQL, Apache or PHP, PostgreSQL, Apache as well as phpAdmin for the database types.  Check it out – I highly recommend it.

Ok, enough evangelizing..So, I downloaded the following:

  • WAMPStack - for my first test
  • LAMPStack – for my final installation
  • MediaWikimodules for both windows and linux – notice I said modules and NOT stacks.  I did it this way so I could install other applications and make it easy for others to install other applications down the road – probably just my viewpoint on how BitNami works.

Next, I installed the WAMPStack and made sure it was working and that I could get to the phpAdmin.  After that I installed the MediaWiki stack for Windows and verified it worked as well (the after installation takes you to the home page of your MediaWiki installation).  And there you have it:  a nice, easy and clean installation of a full web stack along with the open source web application of choice.

Skins

Skins allow you to customize the look and feel of MediaWiki with a single skin set as the global default in the LocalSettings.php (your basic MediaWiki config file) under ..apps\mediawiki\htdocs (..apps is where BitNami installs the web applications so look for your BitNami folder and you will find \apps under it).  Once you have a logon (and you will have a logon if you are the installer) you can go to my preferences at the top of any page and click on the skins tab.

By default, MediaWiki comes with the following skins with MonoBook as the default:

Chick
Classic
Cologne Blue
Modern
MonoBook (default)
MySkin
Nostalgia
Simple

Installing skins is a simple matter. Simply copy the skin_name.php and the skin_name.dep.php to the \skins subfolder and copy the skin files to it’s own folder under the \skins subfolder.  ie… copy theskin.php and theskin.dep.php to the \skins folder and copy the skin .css/image files to \skins\theskin folder.

You would think that something like MediaWiki would have a ton of skins like WordPress or Blogger does but that’s just not the case with many wiki’s and MediaWiki is no different.  I searched and searched and only found one site (Free MediaWiki Skins) that had more than a skin or two.

Not all of the skins work well and many of them seem to have extra headers in them that don’t relate to the wiki layout.  I have not looked at this yet but I will be taking a look to see if it is simply headers exposed by incomplete styles.  Also be aware that what may appear to be a different skin style (hence a different skin) turns out to be the same skin in various stages or implementation.

Here is a list of the skins I downloaded:

  • bookjive.zip
  • cavendish.zip
  • clean.zip
  • drupal.zip
  • enhanced_relief.zip
  • fratman.zip
  • gumax-3-2-1.zip
  • gumax-3-4-5.zip
  • gumaxdd-1-1.zip
  • gumaxv-1-0.zip
  • paulgu.zip

Extensions

MediaWiki offers a ton of extensions but many of them are half finished, experimental or unstable.  Fun.  Anway, here is the help page for checking and installing extensions. And here is extensions matrix that you can spend hours reading through.

The basic installation procedure for extensions is to copy the extension in the \extensions subfolder under ..apps\mediawiki\htdocs, edit the LocalSettings.php and add the include for the plugin similar to this:

require_once( “$IP/extensions/mysuperduperextension.php” );

Most extensions come in the form a a .php file but some of them are quite involved such as the extension to embed FreeMind MindMaps into your wiki pages – read the instructions is all I can say.

Here is my finalized list of extensions I installed:

  • addHTML – Inserts HTML code
  • AnyWikiDraw – The AnyWikiDraw extensions adds a {{#drawing:}} tag to the MediaWiki parser which allows to edit SVG, PNG and JPEG images directly in a page using a Java applet.
  • ArticleComments – a MediaWiki extension that provides a means for creating inline blog-like comment forms for regular wiki articles.
  • CategorySuggest – Adds input box to edit and upload page which allows users to assign categories to the article. When a user starts typing the name of a category, the extension queries the database to find categories that match the user input.
  • FreemindMediawikiExtension (FreeMindFlashBrowser and FreeMindBrowser are part of this) – This extension is for FreeMind-Users. It displays the FreeMind-MindMap (user does not have to install FreeMind).
  • NewArticleTemplate – NewArticleTemplates is an Extension that allows you to automatically prefill text of new pages with the contents of other predefined wiki-pages. It is possible to distinguish between namespaces and specify a different text for new subpages.
  • Dia – The Dia extension allows Dia diagrams to be embedded/rendered inside MediaWiki pages.
  • MindMeister – Provides integration with MindMeister MindMaps.
  • ImagePlus – Imageplus extends the editpage with capabilities to add images and edit the markup of images in a userfriendly way.
  • ImageMapImageMap is an extension which allows clickable image maps.
  • SyntaxHighlighterCodeColorizer – Highlight Syntax and Color Code using javascript. This plugin integrates Alex Gorbatchev’s Syntax Highlighter Tool.
  • jQuery Tab Containers – Helps you organize content of your page into AJAX tabs.
  • Personalised Home Page – This extension allows users to personalise the home page by creating a new page in their user space that will be used instead.

Something to be aware of:  all extension installations are manual via your file manager (unless there is an extension that helps you install extensions which I did not see).

End

So, that is my experience with getting MediaWiki running.  Let me know if you have questions, inputs, etc.

Tab


Written by TRH

July 10, 2009 at 10:03 am

Posted in MediaWiki

Tagged with , , ,