#543 wiki: install syntax highlighter

Created 9 years ago by ianweller
Modified 5 years ago

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

/Summary
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
http://sourceforge.net/project/showfiles.php?group_id=114997
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

or
goto
- 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:
require_once("extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.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">
    <?php
    $v = "string"; // sample initialization
    ?>
    html text
    <?
    echo $v; // end of php code
    ?>
    </source>

++ 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.