TYPO free

home

fighting for TYPO free code

Text Highlighter

Note: This extension will be deprecated as soon as the new syntaxhighlihgt extension reaches the early stages of puberty. Follow the project here: forge.typo3.org/projects/show/extension-syntaxhighlight 

A couple of days ago I wrote a nice ruby script to check our server. The script reads all the vhost files, extracts the DocumentRoot's and searches the paths it finds. It checks if a TYPO3 installation is there and if so, does a sanity check on that installation.

I wanted to share this script with you and thought it would be very nice to display it on a page in all it's highlighted glory. Only . . . the code highlighter in the 'extdeveval' does not do Ruby.

So I searched for code highlighting php scripts and stumbled across a pear module that can handle a lot of languages: http://pear.php.net/package/Text_Highlighter.

Then I copied the idea of using a new content element that the extension sk_codehighlight written by Steffen Kamper uses. You can create a new content element of type 'Highlighted text', paste your text into the box, choose a 'format' and you're done.