1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-09 09:13:25 +02:00
1
GeshiNotes
Cameron edited this page 2017-01-28 13:17:52 -08:00
title, permalink
title permalink
GeshiNotes /GeshiNotes/

Usage

You need to use the Advanced Tag Format: <code ['language'|list] [n] >source code here</code>

Tag Examples

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

function ReadLanguages() {

       global $languages, $languagesPath;        $dirHandle = opendir($languagesPath)                         or die("ERROR: Invalid directory path - [$languagesPath], Modify the value of \$languagesPath'");        $pattern = "^(.*)\.php$";        while ($file = readdir($dirHandle))             {                       if( eregi($pattern, $file) )                                                    $languages[] = eregi_replace($pattern, "\\1", $file);         }        closedir($dirHandle);

}

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

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

- display a list of supported languages <code list></code>

- if invalid language argument, return the language list <code invalid> echo "Hello World"; </code>