sol-Geshi for Joomla

ABOUT GESHI & JOOMLA PLUGIN

Geshi is a generic Syntax Highlighter. If you are not familiar with it you could find more information on the Geshi Webpage:
http://qbnz.com/highlighter/This Plugin give you some simple options to include a file from a specified directory into your content as a highlighted Syntax.
This is usefull for e.g. programmers to show codeparts or examples without needing them to write down in the WYSIWYG Editor of Joomla. I often had big difficulties embedding several codes directly in the article, time to time it cause to break my webpage design or simply broken the code itself. So this Plugin just use a very simple code which is fulle WYSIWYG Editor compatible.

PRE-REQUIREMENT

You need to create a directory on your webserver where you place the codefiles you wish to include into your content. To ensure nobody from the outside can access this codefiles directly I suggest to also place a .htaccess file into this dir. For Example I use a .htaccess file with this content on my /codefault/ directory:

# deny web access
Options -Indexes
Order Allow,Deny
Deny from all

SETTINGS

On the right side you could see a Screenshot of the Adminsettings. You simple can enable or disable / change some geshi options without hacking in the code.

INSTALLATION

Install this Plugin in Joomla, Activate it in the Pluginmanager.
There are some configuration options available.

USAGE

For example if you want to show a PHP code file within your content upload it to the in PRE-REQUIREMENT created directory. e.g. myscript.php then edit the content where you want it to be displayed and enter this:
[geshi:myscript.php]
if you now save & view your content on the page it should display the content of myscript.php highlighted as php.
Geshi is outmaticaly determining the code language by the extension of the file.

NEW GESHI

The joomla embedded Geshi isn't always the newest version so I decided to rather use a external SVN Export of the current Geshi Version. You can download the latest geshi package from the geshi webpage and place it in a directory in your joomla. e.g. I extracted it into the /includes/ folder. After this you can change the path within the plugin settings page.