The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#2
|
|||
|
|||
![]()
If you're talking about custom templates that you're creating and rendering in your custom page, then you should just call register() between the create() and render() calls, like:
Code:
$template = vB_Template::create('some_template_name'); $template->register('myvariable', $myvariable); print_output($template->render()); If you want to register a variable to a vb template, then you need to use preRegister, and it's probably best to do it in a plugin (especially if it's one of those like header, headinclude, or footer). Use hook parse_templates and code like: Code:
if (THIS_SCRIPT == 'myscript') { $myvariable1 = 'something'; $myvariable2 = 'something else'; vB_Template::preRegister('header', array('myvariable' => $myvariable, 'myvariable2' => $myvariable2)); } |
Благодарность от: | ||
haxcommunity |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|