2013-04-01, 02:03 AM
I have this piece of code:
This is what happens:
It's not a function, it's a piece of code inside a file in my MyBB root. How can I remedy this?
If it matters, I am developing on localhost, and I have sometimes noticed that paths using $mybb->settings['bburl'] don't always work, and I have to use the system path ("C:\wamp" etc). I tried that with this and it's not working.
require_once MYBB_ROOT.'inc/class_parser.php';
$parser = new postParser;
$options = array(
"allow_html" => 0,
"filter_badwords" => 1,
"allow_mycode" => 1,
"allow_smileys" => 1,
"nl2br" => 1,
"me_username" => 0);
$parser->parse_message($content, $options);
This is what happens:
I set $content to [i]testing[/i].
$content is displayed as [i]testing[/i] (unparsed).
It's not a function, it's a piece of code inside a file in my MyBB root. How can I remedy this?
If it matters, I am developing on localhost, and I have sometimes noticed that paths using $mybb->settings['bburl'] don't always work, and I have to use the system path ("C:\wamp" etc). I tried that with this and it's not working.