Four Top Wordpress Code Highlighters Reviewed

I recently ran a whole lot of Wordpress code highlighting plug-ins through the grinder and ended up selecting four that, in my opinion, are the worthiest of the lot.

Writing a code highlighter plug-in proves to be a fairly difficult exercise. Your plug-in needs to be smart about its content, or the result will invariably be a disappointment. For instance, if the plug-in is activated using the <pre> tag, then it needs to maintain a stack/counter of <pre> and </pre> tags so that finding a <pre> tag in the code being highlighted doesn’t abruptly terminate the code parsing, disfiguring your blog in the process. I noticed the issue with SyntaxHighlighter, but the other plug-ins may also suffer from it.

SyntaxHighlighter

Tag: [sourcecode language='css']code here[/sourcecode]

My main issue with this plug-in is that it works in visual mode; hence, your source code formatting (tabs etc.) is lost. Other than that, it works well and support a wide range of languages and it offers several very nice features such as ‘copy to clipboard’ or ‘print’. My hope, right now, is that I did not use it correctly.

syntaxhighlighter sample

[rating:3.0]

Highlight source Pro

Tag: <pre lang="enc__php" class="17">code here</pre>

I do not like the use of the class arguments, as it means “start numbering with line 17″ which totally breaks XHTML compliance.

Note the smart use of the enc__ prefix, which, when presents, means that the code being highlighted is encoded using HTML Entities. Add the prefix, you can use the higlighter in visual mode; omit it and work in HTML mode.

highlight source pro sample

[rating:3.5]

FV Code Highlighter

Tag: {code type=php}code here{/code}

Cute display, which will feel immediately familiar to Dreamweaver aficionados. Support PHP, HTML, CSS and XML.

fv code highlighter sample

fv code highlighter admin

[rating:4.0]

WP_CODEBOX

Tag: <pre lang="php" line="1" file="example.php" colla="-">code here</pre>

In my opinion, this is the winner. It works well, looks good and support more languages than any of the others — I counted about 70 different formats!

You can display the code box collapsed or expanded, offer a link to download the code, etc.

wp codebox sample 1

wp codebox sample 2

wp codebox admin

[rating:4.5]

If you enjoyed this post, make sure you subscribe to my RSS feed!


10 things Feedburner does for you – for free.

FeedBurner LogoAs you, no doubt, have noticed, I have decided to stop serving this blog’s content using Wordpress’ standard RSS script; instead, Feedburner is now in charge -note that this option is available to any Zteo blog owner.

Why would I want to do that? An obvious answer is that it keeps track of my feeds’ popularity and is amazingly friendly. But Feedburner can do much, much more for you than just counting readers.

  1. What about those readers who are afraid of syndication? There are some good reasons to be and the main one is that, to use my case as an example, reading RSS feeds is definitely sucking all my free time -the whole daily hour of it I was hoping to scrape… For these user, it is possible, using the same engaging interface, to ask Feedburner to send any new post of interest to their email inbox. No need to maintain a list of feeds, download an RSS reader or find an online one that doesn’t suck.
    .
  2. Select your feed’s format on demand: no need to decide between RSS and Atom. Feedburner will automatically present to your readers whatever format they favor.
    .
  3. Feedburner will also adapt your RSS output to a more palatable one if you’re still using an old version of your blogging program.
    .
  4. NetworkAuto ping: Whenever you make a new post, Feedburner can be configured to alert more blog directories than your default Wordpress installation does. And it does it seamlessly.
    .
  5. Add to Digg/Delicious/FaceBook/etc: I know there are plugins that do this, and do it well. But Feedburner does this AND many other things for you.
    .
  6. Create your own widgets for syndication: You too can offer your supporters to display your feed’s widget on their personal page. Certainly adds quite a touch of professionalism to your blog. You can event create a feed ticker or an animated ‘headline’ but I am having a hard time finding any advantage in doing so.
    .
  7. Create an event feed: Just like upcoming.org, you can have your own feed. Not everyone is going to find a use for this feature but if you’re talking at conferences or simply trying to remind your family of important personal events, it is for you.
    .
  8. Blog PageRe-export your feed to html: …basically, close the loop. From your web page to a feed to another web page. This feature can be helpful if you wish to integrate your blog in another web site. No need to program anything, just copy/paste their code.
    .
  9. Protect your feed: Your feed can be password-protected, so that only your friends/subscribers have access to it.
    .
  10. Monetize: This one is a bit trickier because it does not depend on you. If the good folks at Feedburner think that your blog is valuable, you may suddenly find the Feedburner fairy knocking at your door and offering to join their ad network. I really do not know how good that network is but I imagine that if you get contacted by Feedburner, your blog must be worth something and it’s good news. Period.

These are the things I’ve learned about Feedburner since I started using their services. Let me know if I am missing some interesting stuff in this post.

If you enjoyed this post, make sure you subscribe to my RSS feed!