Title: I&#8217;ve made a new BBCode plugin using PEAR::Text_Wiki_BBCode
Last modified: August 18, 2016

---

# I’ve made a new BBCode plugin using PEAR::Text_Wiki_BBCode

 *  [ben-xo](https://wordpress.org/support/users/ben-xo/)
 * (@ben-xo)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/ive-made-a-new-bbcode-plugin-using-peartext_wiki_bbcode/)
 * install PEAR::Text_Wiki and PEAR::Text_Wiki_BBCode from [http://pear.sourceforge.net/](http://pear.sourceforge.net/)
 * then put this in wp-plugins/text_wiki_bbcode.php
 * <?php
    /* Plugin Name: BBCode (Twiki) Version: 1.0 Plugin URI: [http://www.ben-xo.com/wordpress-twiki-bbcode-plugin/](http://www.ben-xo.com/wordpress-twiki-bbcode-plugin/)
   Description: Allows [BBCode](http://www.phpbb.com/phpBB/faq.php?mode=bbcode) 
   markup to be used in the content, excerpt, and comments of WordPress. Uses [PEAR_Twiki_BBCode](http://pear.php.net/package/Text_Wiki_BBCode),
   so make sure you install that. Author: Ben XO Author URI: [http://www.ben-xo.com/](http://www.ben-xo.com/)*/
 * // Copyright (c) 2004 Jeff Moore
    // Portions Copyright (c) 1997-2003 The PHP
   Group // LICENSE: This source file is subject to version 2.02 of the PHP license.//
   This code contains a modified version of PEAR::HTML_BBCodeParser, // (original
   author Stijn de Reede <sjr@gmx.co.uk>). // [http://pear.php.net/package/HTML_BBCodeParser/docs](http://pear.php.net/package/HTML_BBCodeParser/docs)
 * if (!defined(‘CUSTOM_TAGS’)) {
    define(‘CUSTOM_TAGS’, TRUE); }
 * require(“Text/Wiki/BBCode.php”);
 * $allowedtags = array(
    ‘a’ => array( ‘href’ => array(), ‘title’ => array(), ‘
   rel’ => array()), ‘abbr’ => array(‘title’ => array()), ‘acronym’ => array(‘title’
   => array()), ‘b’ => array(), ‘blockquote’ => array(‘cite’ => array()), ‘code’
   => array(), ‘div’ => array(‘align’ => array()), ’em’ => array(), ‘font’ => array(‘
   color’ => array(), ‘size’ => array(), ‘face’ => array()), ‘i’ => array(), ‘li’
   => array(), ‘ol’ => array(), ‘strike’ => array(), ‘strong’ => array(), ‘sub’ 
   => array(), ‘sup’ => array(), ‘ul’ => array(), );
 * function BBCode($text) {
    $parser =& new Text_Wiki_BBCode(); // $parser->setRenderConf();
   return $parser->transform($text,’xhtml’); }
 * remove_filter(‘the_content’, ‘wptexturize’);
    remove_filter(‘the_excerpt’, ‘wptexturize’);
   remove_filter(‘comment_text’, ‘wptexturize’);
 * add_filter(‘the_content’, ‘BBCode’, 5);
    add_filter(‘the_excerpt’, ‘BBCode’, 
   5); add_filter(‘comment_text’, ‘BBCode’, 5);
 * ?>
 * (i havent made a web page for it yet).
 * Text_Wiki_BBCode is brand new, and doesn’t quite do all BBCode right yet. But
   all the major bugs are fixed in CVS, or at least, fixed on my hard disk (including
   not doing [size=(+/-)n]). You can expect this to continue to get updated for 
   a while to come.

The topic ‘I’ve made a new BBCode plugin using PEAR::Text_Wiki_BBCode’ is closed
to new replies.

## Tags

 * [pear](https://wordpress.org/support/topic-tag/pear/)

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 0 replies
 * 1 participant
 * Last reply from: [ben-xo](https://wordpress.org/support/users/ben-xo/)
 * Last activity: [20 years, 7 months ago](https://wordpress.org/support/topic/ive-made-a-new-bbcode-plugin-using-peartext_wiki_bbcode/)
 * Status: not a support question

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
