submit a bug report if you need technical support or have questions.


Visit the Wiki extensive and up to date documentation at your fingertips.

Contact Me

Missing images/links, any comments, suggestions, need help? Contact me

GeSHi - Generic Syntax Highlighter: GeSHi started as an idea to create a generic syntax highlighter for the phpBB forum system, but has been generalised to this project. GeSHi aims to be a simple but powerful highlighting script, with the following goals:

  • Support for a wide range of popular languages
  • Easy to add a new language for highlighting
  • Highly customisable output formats

GeSHi aims to do this all as quickly as possible. Many customisable features of GeSHi facilitate speed increases, and you can easily find a balance between the amount of highlighting done and the speed in which it is done. from

My upgrade is for mambo 4.5.2...

  • Mambo 4.5.2 already contains Geshi ( in version 1.0.4
  • Geshi 1.0.7 has beeen release in 2005/06/17
  • Geshi 1.0.7 is a major bugfix release over the previous versions, and upgrading is strongly recommended. In addition, four new languages have been added, including highlighting for diff output.

#### Upgrade ####

  1. Download geshi1.0.7 for in my dowmload section
  2. Upgrade Is easy just copy the mambots directory of this archive to the main root of mambo on your server with FTP.
  3. In /css you have the css use on my homepage 

#### What NEW ####
I've changed the mambot (/mambots/content/geshi.php ) a little bit:

  • support for CSS: default true, it reduce bandwith!
  • support for code header: default true
  • support for code footer: defaukt false
  • 38 languages from the standard geshi distribution are now shipped (400kb) delete unneede languages in

to change the value of these flags: open the file /mambots/content/geshi.php and change their default value
 //new code by Walter Cedric

 $useCSS = mosGetParam( $args, 'useCSS', 'true' );
 $useHeader = mosGetParam( $args, 'useHeader', 'true' );
 $useFooter = mosGetParam( $args, 'useFooter', 'false' );
      specify for each <pre> </pre> tag ther value see "example of use"

### use a CSS ###
- Point a browser to
 and follow instructions, you can at the end copy a css template for geshi (cut and paste from your browser in a file)
- Create a file named sourceCodeGeshi.css in directory.
- update four index.jsp from to include the new css on all page:

href="<?php echo $mosConfig_live_site;?>
rel="stylesheet" type="text/css"/>

- You can delete the generator
afterward, even if I think it is not a big security issue...

### use a header or footer ###

  • footer or header are portion of html code that geshi can add during the rendering of source code.
  • the header and footer are now hardcoded in /mambots/content/geshi.php
     if ($useHeader) {
       $header="<div class=\"sourcecodehead\">
    <div class=\"sourcecodetitle\">
    <LANGUAGE> Source code
     if ($useFooter) {
       $footer="<div class=\"sourcecodefooter\">
    <div class=\"sourcecodetitle\">footer


#### example of use ####,
   lang="" is recommended since geshi can not detect thhe language automatically:

   example with java:
 <pre lang="java" useCSS="false" useHeader="false">
 private long startStatistics() {
     long before = System.currentTimeMillis();
     if (logger.isDebugEnabled()) {
       logger.debug("Start conversion " );
     return before;

    publish of course the Geshi mambots in Mambo!

Have fun!

Kudo to the Geshi developer!
Kudo to all GPL project around the world!
Open source is the future of computing ;-)

comments powered by Disqus