Highlight code blocks in bbpress using GeSHi

bbpress plugin » GeSHi Syntax Highlighting

This plugin will highlight your code snippets using the PHP class GeSHi. With bbpress core version it's possible to post code blocks using the html "code" tag, but the presentation is very basic and hard to read by the forum member. Using this plugin the user is able to highlight code in most popular coding of programming language. This plugin is a fork from the Wordpress plugin WP-Syntax by Ryan McGeary.

Installation

  1. To get this plugin working, it might be possible that you need to change some template/plugin file. Check this topic for installation help.
  2. Download the plugin here.
  3. Upload the folder bb-syntax into the /my-plugins/ directory
    If you don't have a /my-plugins/ directory in your bbpress installation, just create one in your bbpress root directory.
  4. Login as an administrator and activate the plugin via Site Management -> Plugins

How-to use the plugin

  1. Wrap code blocks with <pre lang="LANGUAGE" line="1"> and </pre> where LANGUAGE is a GeSHi supported language syntax, the value for LANGUAGE could be php, html4strict, css, javascript, python, perl, xml, mysql and many more. The line attribute is optional.
  2. Example: <pre lang="php" line="1"><?php echo 'Hello World!'; ?></pre>

bbpress forum plugins

Post your comments or questions here.

All bbpress plugins from this website are GPL Compatible.