Theres only one thing that I love more than technology and thats code!
I've added the IG: Syntax Higliter plugin to this blog so I can start publishing snippets of code on this blog. The plugin can support php, html, sql, and a whole host of others languages click here to find out more about it.
Below is a fascinating piece of PHP I cranked out to check its working.
PHP:
My only complaint I have about the plugin is it doesn't seem to provide any indentation when it displays the code, even if you paste the code into wordpress nicely indented. Maybe there's a setting to activate this. If anyone can tell me where it is I'll buy them a beer, if you don't drink beer then you can watch me drink two instead.
// Pete Graham
Comments 4
Just noticed that the PHP keywords are hyperlinks to their definitions on the PHP website, that’s pretty damn sweet!
Posted 26 Jan 2007 at 1:03 pm ¶That’s some sweet looking highlighting. However the HTML is produces is a fricking nightmare. The reason your indentation is being lost is that it’s chucking each line of code into an li in an ol. The tabs are all gone for good
Posted 26 Jan 2007 at 1:11 pm ¶That is phat.
Posted 26 Jan 2007 at 1:14 pm ¶Yeh the HTML is a bit nasty, although it will do until I find a better replacement.
Its my new policy to put things in place that actually achieve a task, rather than spend ages attempting to find/create a prefect solution and not actually completing anything.
Posted 26 Jan 2007 at 1:16 pm ¶Trackbacks & Pingbacks 2
[...] I was pretty pleased with the code syntax highlighting plugin I installed yesterday, just before I was about to finish work I got the Blog up in IE6 Arrrggghhh! IE6 redenders the width of the main content column smaller than Firefox and IE7, this causes the main content to be displayed below the content in the right sidebar, not good. [...]
[...] If you have a site with a narrow main content area like this blog then the IG Syntax Highliter plugin can break your layout in Internet Explorer 6. This problem can be easily solved by modfying the file syntax_hilite_css.css. Here is where this file is located: [...]
Post a Comment