Wiki Extensions

From Physiki
Jump to: navigation, search

The wiki is running a few extensions to better serve the community. This page seeks to document the installation procedure for the various extensions. Please note that much of this is taken from the respective MediaWiki pages and the purpose of this is not to replace them, but rather provide some more detail for myself or future TICC webmasters.


Syntax Highlight GeSHi

This extension is run on wikipedia and many other sites and provides the nice code formatting you find there. This can be used as a replacement for the pre tag.


  1. Download the newest version from the Mediawiki page. It should already have GeSHi bundled.
  2. At the bottom of the LocalSettings.php file, add


To get the boxes around code, much like I have on this page, go to MediaWiki:Geshi.css and add: {
  padding: 1em; 
  margin: 1em 0; 
  border: 1px dashed #2f6fab;

This formats the code with the clean, dashed borders. Supported languages can be found here, as well as usage.

Confirm Edit

Confirm Edit is an extension that adds Captcha's to pages based off of settings in its ConfirmEdit.php file.


  1. Download the latest file.
  2. If you extract the archive to the $IP/extenions folder, you shouldn't need to move any other files around.
  3. Add the following line, near the bottom, to your LocalSettings.php file:
    require_once( "$IP/extensions/ConfirmEdit/ConfirmEdit.php" );


There are five default types of Captcha that can be used, but we chose to combine this with the extension VisualMathCaptcha. See other configuration options at the MediaWiki page on the extension.

Visual Math Captcha

This provides the visual captcha that you see if you try to create a page, or when you register.


  1. Ensure that GD for php5 is installed. If not, install it using
    sudo apt-get install php5-gd
  2. After it is installed, you will need to restart apache using
    /etc/init.d/apache2 restart
  3. Download the extension files from the MediaWiki page.
  4. Add the following to the LocalSettings.php
    require_once( "$IP/extensions/VisualMathCaptcha/VisualMathCaptcha.setup.php" );
  5. Since we're using this with ConfirmEdit, change $wgCaptchaClass's value to VisualMathConfirmCaptcha in ConfirmEdit.php, located in ConfirmEdit's extension directory. The line should now look like
    $wgCaptchaClass = 'VisualMathConfirmCaptcha';
  6. The next step on the MediaWiki page states that you are supposed to add
    $wgAutoloadClasses['VisualMathConfirmCaptcha'] = "$IP/extensions/VisualMathCaptcha/VisualMathConfirmCaptcha.class.php";
    to the LocalSettings.php file after content from a LocalSettings.part file which was provided. I did not find the provided file, and simply added the line after the the one added from step 4.


You can configure the number of terms in the equation and what operations can be performed. Currently, on this wiki, the number is three elements with addition, subtraction, and multiplication allowed.

Simple Anti-spam

The idea behind this extension is that it adds a form to pages that cannot be seen, but if it is not blank, the wiki returns an error about triggering a spam filter. I have not had great success with this, and have posted a request to add how many it blocks.


  1. Download from the MediaWiki page.
  2. Extract the files into into $IP/extensions/SimpleAntiSpam.
  3. Add the following to LocalSettings.php:
  4. Installation can now be verified through the wiki's Special:Version page
Personal tools