Extension:CodeTag

Description
This is yet another GeSHi based syntax highligher extension. The extension is actually quote old, but, for various reasons, was omitted from MediaWiki. It is now posted here purely for historic documentation reasons.

Step 1
Copy the following code into your extensions directory under Code/Code.php file. $wgExtensionFunctions[] = "wfCodeExtension"; $wgExtensionCredits['parserhook'][] = array(       'version'     => '0.8',        'name'        => 'Code',        'author'      => 'Paul Grinberg',        'description' => 'adds

Step 2
Add the following text to your LocalSettings.php:

Usage
The extension has the following usage:

where options are: lang='s'      This is the language type that explains how to highlight the code. Default is 'text'. See GeSHi for full list of supported syntaxes linenumbers   Turn on line numbers for each line in your code download      Turn on the "Download Code" link for this block of your code tabwidth='n'  How many spaces does a TAB represent fileurl='s'   Instead of processing the code provided between the tags, process the code at specified URL

Revisions

 * v0.8 - April 29, 2010 - initial release on MW.