MyBB Community Forums

Full Version: Need Support Help for parser_options
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

i will insert a page and translate to mybb-code


define("IN_MYBB", 1);
require_once $change_dir."/global.php";
require_once MYBB_ROOT."inc/class_parser.php";

$parser = new postParser;

var $thisismycode; // text
blabla ... my source 

$parser_options = array(
"allow_html" => "1",               // or "yes"
"allow_mycode" =>"1", 
"allow_smilies" => "1", 
"allow_imgcode" => "1", 
"nl2br"=>"1",
"filter_badwords" => 1,
"shorten_urls" =>"1",
"me_username" => "0");

$givetopage=$parser->parse_message($thisismycode, $parser_options);

but this will not work, why ?
it will no translate html, no mycode, no smilies, no img, no break,
nothing....
can you send a runing demo that i can see it a correct code ????
i have mybb 1.4.2

thanks
not sure, but just for the hell of it - try adding "echo $givetopage;" and the end, without the "'s