Monday 12 July 2010

Customizing MediaWiki: Random questions answered

What exactly is the LocalSettings.php file?

The LocalSettings.php file is the main configuration file for MediaWiki Wikis and is created during installation of the MediaWiki software.

How do I edit the LocalSettings file?

To edit the LocalSettings.php file you'll need a good PHP editor, however, do NOT edit this file with any text editor that adds byte order marks to files as you'll be more likely to break your Wiki before you customize it, in simple English (As this is what this Blog's all about after all... Don't edit the file with Notepad!) I personally use
jEdit, it's free, versatile and gets the job done, however, there is also a list of PHP editors on Wikipedia.

How do I find and install extensions to the MediaWiki software?

Extensions can be found here by category on MediaWiki.org. A typical extension installation usually involves downloading the extension package and adding it to your /extensions folder followed by adding this code to your LocalSetting.php file:

require_once( "$IP/extensions/folder_name/extension_name.php" );


Generally speaking, most popular extensions are fairly well documented and have pretty specific installation instructions if the extension cannot be installed using the typical method mentioned above. Once installed correctly the extension will display under the "Installed extensions" section of the Special:Version page on your wiki.

How do you prevent an anonymous user's IP address from showing up next to the Log in / create account link?

This can be disabled by adding this code to your LocalSettings.php file:

$wgShowIPinHeader = false;

How do you prevent the view counter from showing up on pages?

You can completely remove the counters by adding:

$wgDisableCounters = true;

To your LocalSettings file.

No comments:

Post a Comment