August 10th, 2008 § § permalink
Plugin: SyntaxHighlighter Plus 0.18
Backend: Google Syntax Highlighter Javascripts
Score: 7/10
The SyntaxHighlighter Plus is another WordPress highlighting plugin based off of the Google SyntaxHighlighter. (See my Google Syntax Highlighter Review) But while the Google Syntax Highlighter plugin simply inserts links to the javascripts, SyntaxHighlighter Plus is more integrated into WordPress. It uses BBcode tags instead of <pre> and doesn’t require the code to be preformatted, letting WordPress convert the special characters (sidenote: If you go back to edit the source code, you will find that the special characters have been escaped, making it difficult to edit your code.)
Unfortunately, the BBcode tags don’t allow for the configuration options to be passed to the scripts. (Maybe in a future release?)
SyntaxHighlighter Plus supports the same languages as Google Syntax Highlighter, and the formatted output looks the same. I recommend the Google Syntax Highlighter plugin if you want to use the configuration options, and this SyntaxHighlighter Plus plugin if you are too lazy to pre-escape all your special characters.
Example formatting… looks familiar

WordPress Markup: Notice the non-escaped angle brackets and [sourcecode] BBtag

August 9th, 2008 § § permalink
Plugin: Google Syntax Highlighter 1.5.1
Backend: Google Syntax Highlighter Javascripts
Score: 7/10
Google Syntax Highlighter uses Google’s Syntax Highlighter by Alex Gorbatchev.
Installation is easy, just unzip and activate. If it doesn’t work, make sure that your theme has a <?php wp_footer(); ?> tag just before the </body> tag.
Google Syntax Highlighter supports C++, C#, css, delphi, java, javascript, php, python, ruby, sql, vb, and xml (according to the Supported Languages wiki page). I’d like to see bash and perl on the list. I’m not sure how extendable the code is, or if anyone has written their own scripts for these.
Customization seems like it would be pretty easy since formatting and colors are defined in a css style sheet. There are a few configuration options you can pass to the script which control how the formatting looks. The collapse is nice, so your code starts out hidden. Unfortunately, there is no way to re-collapse the code after being expanded, but it is a nice option to have. You can also start the line numbering at a specific number.
The highlighter uses a <pre> tag to format the code, but requires that the code is preformatted, escaping special characters. This can be accomplished with postable, but I’d rather not have to deal with that. Also, since it gets parsed by javascript scripts, it lags a bit when loaded. There’s maybe half a second before the actual formatting appears.
There are some nice features, with view plain, copy to clipboard, and print links at the top of the code. Overall, a pretty nice highlighter.
Example of configuration options: collapse and showcolumns

Example highlighting

WordPress markup

August 9th, 2008 § § permalink
Plugin: WP Chili 1.1
Backend: Chili 2.2
Score: 3/10
WP Chili was the #1 pick by Chris Cagle’s WordPress Syntax Highlighting Plugins Review, so I thought I’d give it a try. I’m looking for a highlighter for c/c++ code and probably bash/perl/python scripts I’ll be posting here. My test platform is Utuntu Hardy with Firefox 3.0.1 and Opera 9.50 beta 2.
Installation was simple, just unzip into the plugins directory and activate.
Setup was a bit more complicated. I used Chris’s kindly provided css for formatting, but the formatting failed to apply. I eventually found the correct C++ tag (<code class=”cplusplus”>) in the source code of this example page. Line numbering is possible by wrapping the <code> tag in a <pre class=”ln-”> tag. I didn’t like having to preformat the code, although Elliot Swan’s postable site did make this fairly easy, it’s just another step I’d rather not do.
WP Chili seems to support c++, c#, css, delphi, html, java, javascript, lotusscript, mysql, php. It lacks support for scripting languages, and easy customizable colors (the colors are set in the javascript code, not in an easily editable css file). At least the default color scheme looks decent.
Overall, WP Chili seems like too much work to use, with only a few features and poor documentation.
Example highlighting with default colors

WordPress markup
