GeSHI Helper
The GeSHI Helper file contains functions that assist in working with GeSHI to perform code highlighting in a number of programming languages. You can always upgrade to a newer GeSHI than the one that comes with this package, but our code provides necessary navigational objects that you would have to also update if you did that.
Loading this Helper
This helper is loaded using the following code:
$this->load->helper('geshi');
The following functions are available:
geshi_select( $id='', $js ='' )
Returns a <SELECT> tag for selecting a type of GeSHI. Optionally can trigger an onchange() which matches an ID which will repopulate with AJAX.
Example:
$page->append_body( '<div id="highlighted">' . $content . '</div>' . geshi_select( "highlighted", get_ajax() ) );
geshify( $content, $highlight )
Geshifies a piece of unformatted text. You can usually, but not always, supply the file extension as the "highlight" for the most common GeSHI languages.
Example:
$page->append_body( geshify( "<html></html>", "html" ) );