XF 2.0 BBcode disable tags

AndyB

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

https://xenforo.com/community/resources/bb-code-parser.2796/

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

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

$formatter = XenForo_BbCode_Formatter_Base::create('XenForo_BbCode_Formatter_BbCode_Filter', false);
$formatter->disableTags($bbcodeArray);

$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:
Back
Top Bottom