Extension:GeSHiCodeTag

Introduction
I've been searching for a good syntax-highlighting code extension for MediaWiki but unfortunately I can't find one that fit my needs. So I decided to just create one myself since I'll also be using it heavily on my site. I also wrote the code as readable and customizale as possible so you can easily extend its features. Feel free to email me for questions/comments/suggestions/errors. Hope you all like my first (and hopefully not the last) MediaWiki extension!

README
Features:
 * Two types of code tags: simple and advanced.
 * Ability to list all languages supported by GeSHi.
 * Ability to disable/enable the code tags
 * Extendability and readability of the code.

Requirements:
 * GeSHi

Tested on: (If you've tested it and it's working on a different version please add it here! Thanks!)
 * MediaWiki 1.11.0, 1.10.1, 1.10.0, 1.9.3, 1.9.2, 1.8.2, 1.7.1, 1.6.8, 1.5.7 (Not working on: 1.5.3)
 * GeSHi-1.0.7.20, 1.0.7.19, 1.0.7.17, 1.0.7.12
 * PHP 5.04, 5.2.1 5.1.4, 5.1.2

Instructions:

include("extensions/GeshiCodeTag.php");
 * 1) Download Geshi, extract it and place the entire folder content under yourWikiSite/extensions/
 * 2) Copy the GeshiCodeTag Source below and save it as GeshiCodeTag.php (Note: Be sure to change the $languagesPath depending on your directory)
 * 3) Place GeshiCodeTag.php to yourWikiSite/extensions/
 * 4) Add the include tag right before $wgSiteName of yourWikiSite/LocalSettings.php
 * 1) GeshiCodeTag extension

'''That's it! Copy the "Tag Examples" below to see if it's working correctly'''

Usage
There are two code tags that you can use:


 * 1) Simple Tag Format:      <'languages'>source code here
 * 2) Advanced Tag Format:

Tag Examples

- simple code tag echo "Hello World";

- advanced code tag

- advanced code tag with line numbers

- default code tag

- display a list of supported languages

DEMO: Here's the result of all the examples above http://wikics.org/GeshiCodeTag_Demo BAD LINK

ChangeLog

 * Added changes suggested by Jonyo in the Discussion. It allows GeshiCodeTag to be interleaved with a list. --Paul516 08:17, 9 May 2007 (UTC)
 * Add default language "text" to satisfy legacy wiki code with

Discussion
Click here for any questions/comments/suggestions regarding GeSHiCodeTag