Changes

Jump to navigation Jump to search
inital draft
Writing good code follows good coding standards. On top of coding standards, syntax highlighting reveals the code making it easier to read (and learn).

There is a [http://qbnz.com/highlighter/faq.php Generic Syntax Highlighter] or GeSHi for short which is available as a Debian package (sudo apt-get install php-geshi). Adding a [http://meta.wikimedia.org/wiki/GeSHiCodeTag_Extension GeSHi Mediawiki] extension to allows it to be used in this wiki.

Incorporating it into Mediawiki is just a matter of creating/configuring the extension and including it in LocalSettings.

== Usage ==

There are two code tags that you can use:

# '''Simple Tag Format:''' <nowiki><'language'>source code here</'language'></nowiki>
# '''Advanced Tag Format:''' <nowiki><code ['language'|list] [n] >source code here</code></nowiki>


'''Tag Examples'''

''- simple code tag''
<br>
<nowiki>
<php> echo "Hello World"; </php>
</nowiki>


''- advanced code tag''
<br>
<nowiki>
<code php>
echo "Hello World";
</code>
</nowiki>


''- advanced code tag with line numbers''
<br>
<nowiki>
<code php n>
echo "Hello World";
</code>
</nowiki>


''- default code tag''
<br>
<nowiki>
<code>
echo "Hello World";
</code>
</nowiki>


''- display a list of supported languages''
<br>
<nowiki>
<code list></code>
</nowiki>

== Supported Languages ==
<code list></code>

== Documentation ==
See http://qbnz.com/highlighter/geshi-doc.html for the extensive documentation. GeSHi is used in a number of other software projects like
* Dokuwiki - An advanced wiki engine
* gtk.php.net - Their manual uses GeSHi for syntax highlighting
* WordPress - A powerful blogging system*
* PHP-Fusion - A constantly evovling CMS
* SQL Manager - A Postgres DBAL
* Mambo - A popular open source CMS
* MediaWiki - A leader in Wikis*
* TikiWiki - A megapowerful Wiki/CMS
* TikiPro - Another powerful Wiki based on Tikiwiki
* RWeb - A site-building tool
If you want to use it in OASIS projects besides this wiki, then start with the documentation.


[[Category:Development]]
[[Category:Wiki]]
4,558

edits

Navigation menu