Quote:
Originally Posted by Citizen Bleys
I did chdir into the forums directory before including the forum files--it's actually the first non-commented-out line in the script I posted. Calling global is the first line in the script, it can't be called any earlier than that
|
You said that you include the global before on the main index page before this one is included. It wont work that way, the global.php file includes other files by relative path so if you're not in the forum directory when you include it, it wont work right. Unless the index file changes to the forum directory as well?
Also, with your function on the following post, it is not quite right, there are a few things wrong. You need to set vbulletin as global in the function, you're not returning the text and you are not passing the variable into the function to be parsed.
PHP Code:
function parseMe($parse_var) {
global $vbulletin;
$parser = new vB_BbCodeParser($vbulletin, fetch_tag_list());
$parsed_text = $parser->parse($parse_var);
return $parsed_text;
}
$text = parseMe($text);
echo $text;