MyBB Community Forums

Full Version: Using MyBB parser class
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(Sorry for the bad english, i'm italian D:)

Hi, i use MyBB integrator of phpdave.

I have a question...
I use MyBB tag ([b.] for example), and rightly MyBB save the post as it is.

Same thing when I'm going to take the post from the database ... Now I have a question, you can use the MyBB calss parser to get the same result that I see in a normal post on the site?

if true how?
I guess you can.

The parse_message($message, $options=array()) function in inc/class_parser.php does the work for MyBB.

An example options array sent by MyBB in showthread.php

$parser_options = array(
				"allow_html" => $forum['allowhtml'],
				"allow_mycode" => $forum['allowmycode'],
				"allow_smilies" => $forum['allowsmilies'],
				"allow_imgcode" => $forum['allowimgcode'],
				"allow_videocode" => $forum['allowvideocode'],
				"filter_badwords" => 1
			);
Thanks, i have solved:

http://pastebin.com/dE0nEXMm