February 29th, 2008
PHP / mySQL
6 comments
I couldn't find any helper for CakePHP to implement GeSHi, so I had to write my own. Bellow are the results of this helper in action.
To be able to use this helper you need to download GeSHi and put it in /app/vendors/geshi directory. You only need geshi.php and the geshi folder.
/app/views/helpers/formatting.php
Load the helper into your cotroller var $helpers=Array('Formatting');. To tell the helper what to highlight, the text from your view must be between the <code></code> tags. You can specify the language you wish to highlight like this: <code language="php"></code>. If no language is defined, the default ...read more
To be able to use this helper you need to download GeSHi and put it in /app/vendors/geshi directory. You only need geshi.php and the geshi folder.
/app/views/helpers/formatting.php
to view the code read the full post
Load the helper into your cotroller var $helpers=Array('Formatting');. To tell the helper what to highlight, the text from your view must be between the <code></code> tags. You can specify the language you wish to highlight like this: <code language="php"></code>. If no language is defined, the default ...read more
