Content last modified Monday 6 March 2017
hop to #bottom
Current version:
About It:
Get it:
Rate it:
  • Helpful?
  • 6 Yes
  • 0 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!


In order to have an easy to use syntax highlighter into TextPattern I wrote this plugin, fox_code.
It brings some useful tags that will allow you to customize your code sections just like you want, because of it’s integration with textpattern’s templates.

Here is the link to the plugin’s page: information page
It’s written in italian, but the plugin’s help page (the one that you can read from textpattern I mean) it’s in english.

GeSHi supports more than 130 languages, including PHP, HTML, CSS, Java, C, Lisp, XML, Perl, Python, ASM and many more.

WARNING: Upgrade from 0.2
If you’re upgrading fox_code from version 0.2 to 0.2.1 please be careful: because of new mandatory naming conventions starting from Textpattern 4.4, two tags changed name. More precisely:

  • fox_codeForm becomes fox_code_form
  • fox_codeFormAttr becomes fox_code_form_attr

Be sure to update your articles and forms in order to use the new names. You could consider to launch a couple of MySQL UPDATE queries with REPLACE ( ) on the tables “textpattern” and “txp_form” instead of manually replace every instance. In this case, be sure to include both “Body” and “Body_html” fields for the “textpattern” table and the “Form” field for “txp_form”.

You have to install the GeSHi library before starting to use the plugin (download page).
Unpack it and move geshi.php and the geshi folder to textpattern/lib.
If you don’t want to write your own form template, you can download the example one from the information page.

If you are a developer and you want to take a look, fork or improve my code then you can find it on github.


  • 0.2.1 – compatibility with Textpattern 4.4 (2011-09-03)
  • 0.2 – fromline and toline options added (2007-12-08)
  • 0.1.1 – bugfix (2007-07-16)
  • 0.1 – first release (2007-07-06)

Article Request Count:
Initially released:
Posted here:
09 Jul 2007
Article modified:
04 Sep 2011

If there is a comment form at the Information URL, you may want to leave your comments/questions there or at the Forum thread for quicker feedback. Otherwise, comment away:

Your comment will NOT be submitted until you click the 'Submit' button on the next pageload.

Subscribe to this article's comments RSS feed. [ ? ]   View Recent Comments across the site.

You know you want to visit the Archives.




There are also tag clouds, 'cause those are fun.
Published with Textpattern