#543 wiki: install syntax highlighter

Created 8 years ago by ianweller

i'd recommend http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi, it is the one mediawiki.org uses

By: Jose Manimala
Dated: 17/03/2009
Extension used: SyntaxHighlight_GeSHi(As recommended)
1. Installed a fresh mediawiki instance.
2. cd extensions folder in mediawiki installation.
3. downloaded the latest stable version of SyntaxHighlight_GeSHi from
4. The file geshi.php is required for the extension to work. If the mediawiki install was done by means of subversion then the following procedure is to be followed.
- cd extensions/SyntaxHighlight_GeSHi/
- svn checkout http://geshi.svn.sourceforge.net/svnroot/geshi/trunk/geshi-1.0.X/src/ geshi

- http://qbnz.com/highlighter download the latest copy.
- unzip it to a folder under extensions/SyntaxHighlight_GeSHi/ preferably geshi

Note: do not forget to change the path in SyntaxHighlight_GeSHi.class.php to require_once( 'geshi/geshi.php' ); or else the mediawiki install blanks out.
5. Add this line to your LocalSettings.php:
and now your extension should be up and running.

  1. Edit a page and use the following example to test the extension
    <source lang="php">
    $v = "string"; // sample initialization
    html text
    echo $v; // end of php code

++ Fin ++

The review here didn't result in a package. ;)

Closing this. If we still want a syntax highlighter, we should look at re-submitting it or finding a easier to package one.

Login to comment on this ticket.