XF 2.0 BBcode disable tags


Well-known member
I would like to convert my BBCode Parser


to XF2. In the PHP code (xf1 version) I have the following:

// put bbcode into an array
$bbcodeArray = explode(',', $bbcode);

$formatter = XenForo_BbCode_Formatter_Base::create('XenForo_BbCode_Formatter_BbCode_Filter', false);

$parser = XenForo_BbCode_Parser::create($formatter);
$newMessage = $parser->render($this->get('message'));
$bbcode is a string with bbcodes separated by commas. For example "font,size,color" etc..

Any tips at which code I should look at in XF2 that will allow me to re-create what I have in XF1 to XF2.

Thank you.
Last edited:


Well-known member
Got it. Took a few more lines of code but I was able to get it by looking at the XF2 code.