The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Put own variables
I want to include a php file in vb4 header.
How can i do? I don't understand well how to use a variable that i create in a new "global start" plugin. I try with {vb:raw varname}, but it doesn't display nothing... Thanks |
#2
|
||||
|
||||
Variables must be registered with the template before you can use them. Add this to the end of your plugin, for example.
PHP Code:
|
#3
|
|||
|
|||
id doesn't work:
Code:
ob_start(); include('/pathto/header.php'); $header_include = ob_get_contents(); ob_end_clean(); vB_Template::preRegister('header', array('header_include' => $header_include)); |
#4
|
||||
|
||||
Move the plugin to the 'parse_templates' hook and see if anything changes.
|
#5
|
|||
|
|||
it works well!
thanks |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|