PHP Forums Archive

How-to GeSHi Syntax Highlighting

Tags: plugin, how-to, highlight, syntax

Olaf posted on 2009-09-09 05:40:02 #

If you use the Syntax Highlighting plugin you might have some problems. Most common problem is that code is not highlighted!

I changed the following to get it working:

social-it plugin - change the add_filter command inside the plugin to

add_filter('post_text', 'socialit_insert_in_post', 20);

Comments / discussions

Olaf posted on 2009-09-12 06:18:43 #

Just updated the syntax plugin with:

  1. You don't need to add the add_content_post_form() to your edit-form.php template, it's done by the plugin now.
  2. I changed some of the code on how to parse code a little, some parts are messed up with html entities. All entities are re-converted by default now.

It might be possible that you have to change your templates style sheet a little. This is what I have now (to be able to have the old code/pre tags as well)

pre, code { overflow:auto; font: 1.0em Monaco, 'Courier New', monospace;color:#0000FF; }
pre code { display:block; }