01 November, 2008
Well, goals rock. You can't get anything really productive done without setting attainable goals. They help structure your thought processes, and give you direction. They keep you on track, and they pay off in the end.
So it was pretty much always going to be server side. I set on towards my goal tonight, being a little cocky about it, giving myself under 30 minutes to get it complete and working in some manner on the site. I managed to complete the job with 7 minutes to spare!! So, we not have a syntax highlighting CakePHP Helper thats doing the job nicely. Its based on the GeSHi Syntax Highlighter which is done in PHP and fits nicely into CakePHP as a vendor.
After the initial test and success, I took some time to implement some of the more advanced options provided by GeSHi into the Helper to allow people using the helper some quick and easy customisation of the output. This includes currently: Wrapper tag (using the CakePHP standard 'tag' option), Line number formats, case modification for keywords, Assignment of element ID, Assignment of CSS classes to the code wrapper, Language setting, Source setting and finally, Line Number start specification (so you can start at a line number other than 1).
While this is not yet public, You should look forward to a release onto the CakePHP bakery (and probably here too) in the next week or so.
If I have not released it by then, for God sake.. email me and abuse me till I post it up.