Here kh's post:
Quote:
I think the problem is that you need global \$ bootstrap in the function befor eyou include global\ . php. Tried to post this in the thread but for some reason my posts are being moderated.
|
Wow... it works.
BUT... now I seem to have the template, but the template parse function does some really weird stuff i only can explian via screenshot. Look at this...
Attachment 134626
This happens as soon as I include the $templater->parse() call, no matter if it actually outputs something or not.
My code now is like this:
PHP Code:
global $vbulletin;
$templater = vB_Template::create('cms_toplinks');
$templater->register_page_templates();
$str = $templater->render(true);
//print $str;
With print $str being active, I get the exact same result, only with the toplinks bar rendered at the correct position (as it should be) with this code mess on the site still...
I have no idea where this could come from. maybe an issue with output buffering? But why dump all the php code un-rendered? Is this maybe a vbulletin-related bug?