alistairphillips.com

I’m : a web and mobile developer based in the Manning Valley, Australia.


FriendlyCode

Well here is my first plugin that I've developed for Wordpress. It's called FriendlyCode and lets you highlight your source code with lots of nice colours - making it nice and easy to read.

The idea for this plugin was based on the "Syntax Highlighter Enscript" plugin by Scott Yang. I was using that at first but found that it did not parse some of my PHP code very well resulting in errors on the page. So I set out to make my own using the PEAR Text Highligher package.

Give it a whirl, simple add the following to your post:

<friendlycode lang='php'>
 Code goes here
</friendlycode>
<?php
    // Here is some PHP code - see how it comes out with the colour?
    echo "I am PHP!";
?>

Language could be one of:

It's very beta at the moment but seems to be working fine for me at the moment. Would love to hear feedback and suggestions on this one.

Get it here, and extract (keeping the directory structure) into your wp-content/plugins. Activate it from the plugin dashboard and use as above.