Extension:SyntaxHighlighterAndCodeColorizer

Introduction
Highlight syntax and color code using JavaScript. This plugin integrates Alex Gorbatchev’s Syntax Highlighter Tool.

Supported languages

 * ActionScript 3
 * Bash/shell
 * ColdFusion
 * C#
 * C++
 * CSS
 * Delphi
 * Diff
 * Erlang
 * Groovy
 * JavaScript
 * Java
 * JavaFX
 * Perl
 * PHP
 * Plain Text
 * PowerShell
 * Python
 * Ruby
 * Scala
 * SQL
 * Visual Basic
 * XML
 * Custom languages (several have already been created)

Example
See it in action:
 * Syntax Highlighting Example on MediaWiki

Usage
Just surround your code like this (note that your code must be HTML escaped):

or like this:

segment with the type of code you have. For a list of all available brush aliases, see here. There's some pros and cons for each of the above options here.

Admins can provide additional aliases (like &lt;plsql&gt; your code &lt;/plsql&gt;) by adding to the extension file code like this:

Download instructions
Download

Installation
To install this extension, add the following to LocalSettings.php:

You might get an error when you access your wiki in the browser. This can be because of the "-". To remedy to that problem, you can change to :

Where highlight.php is the same as syntax-highlighter-mediawiki.php, but changed accordingly to the new paths according to what is below.

Code
If you've changed your pathname because of the problem caused by the "-", you should change all the pathnames above to the new pathname (in our example, '/extensions/syntax/...').

Alternative installation
Alternatively, you could handle the installation of the appropriate files and the generation of this content all with a script. An example of this can be seen here.