In a default bbpress install, you can use ` or [code] to specify "code" formatting. The problem is, none of the scripts I put up would display properly because we use ` in the bourne shell. So it had to be removed!
This hack was provided by zaerl on the bbpress.org forum. It's worth mentioning that on bbpress updates you might have to re-apply this hack.
Navigate to: /forum/bb-includes/
1) Edit the file: functions.bb-formatting.php
2) Look for the following sections and make the following changes*:
function bb_decodeit( $matches ) {
return "$text";
function bb_code_trick( $text ) {
//$text = preg_replace_callback("|(`)(.*?)`|", 'bb_encodeit', $text);
//$text = preg_replace_callback("!(^|n)`(.*?)`!s", 'bb_encodeit', $text);
3) Save the file.
The pastebin code can be found here: http://pastebin.com/SAx377E4 (Thanks again to zaerl!)
To modify your theme so it doesn't say "... you can also use backticks..."
1) Go to your themes directory.
2) Edit this file: edit-form.php
3) Go to the very bottom and remove this from the line*:
<?php _e('Put code in between [/code][code]`backticks`[/code].'); ?>
4) Save that and open post-form.php
5) Go to the very bottom and remove this from the line:
<?php _e('You can also put code in between backtick ( [code]`[/code] ) characters.'); ?>
* Make sure you change all [ to < and ] to >.
All done!