The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
Why can't I preregister a template variable in a function?
I got started on a project to make the What's Going On box available on pages other than the home page. The way I wanted to do it is shown schematically below:
Code:
function whats_going_on($template_name) { global $vbulletin, $show, $template_hook, $vbphrase; . . . $templater = vB_Template::create('whatsgoingon'); . $preregistered['whatsgoingon'] = $templater->render(); vB_Template::preRegister($template_name, $preregistered); } whats_going_on('FORUMDISPLAY'); Code:
function whats_going_on() { global $vbulletin, $show, $template_hook, $vbphrase; . . . $templater = vB_Template::create('whatsgoingon'); . return $templater->render(); } $preregistered['whatsgoingon'] = whats_going_on(); vB_Template::preRegister('FORUMDISPLAY', $preregistered); |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|