Skip to content

Instantly share code, notes, and snippets.

Created August 29, 2016 02:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/e91030fb6d2f93b0f6aacc5fc3bdf0b8 to your computer and use it in GitHub Desktop.
Save anonymous/e91030fb6d2f93b0f6aacc5fc3bdf0b8 to your computer and use it in GitHub Desktop.
Parsing BB Code to HTML in custom PHP pages in MyBB
require_once MYBB_ROOT."/inc/class_parser.php";
$parser = new postParser(); </code>
$parser_options = array(
'allow_html' =&gt; 'no',
'allow_mycode' =&gt; 'yes',
'allow_smilies' =&gt; 'yes',
'allow_imgcode' =&gt; 'yes',
'filter_badwords' =&gt; 'yes',
'nl2br' =&gt; 'yes'
);
$message = $parser-&gt;parse_message($message, $parser_options);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment