Highlight code blocks in bbpress using GeSHi


bbpress forum plugins

Find on this page plugins for the forum software bbpress.

bbpress is based on the code from WordPress and is based on web standards.

Post your comments here

All plugins are GPL Compatible.

Please vote for us...

bbpress logo

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.

Let Google find all your forums topic pages even if they have multiple sub-pages!

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

  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>