The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
|||
|
|||
Quote:
Quote:
$this->register_global('vbphrase'); $this->register_global('vbcollapse'); I was using the register_global() (no "s") function incorrectly. I was thinking it made a reference to the variable available globally, but as you point out, that's what $GLOBALS does anyway. Thanks again for the help ------------------------------------------- For anyone reading this after us: register_globals() is called with the purpose of registering certain variables within the scope of the particular template being rendered (they are already in the $GLOBALS array). Basically, it does a $templater->register(), but it passes the global variable by reference so that it will have the latest value when used rather than the value it held when it was registered. The final result is: $templater->registered['vbphrase'] =& $GLOBALS['vbphrase']; In the end, the difference between using register_globals() and not is the way you reference a variable within the template as it's being rendered. Using register_globals(): {vb:raw vbphrase.monday} Not using register_globals(): {vb:raw GLOBALS.vbphrase.monday} Be Well |
#12
|
|||
|
|||
Ah, I see - that does make sense. And it probably is good for readability, if nothing else, to explicitly register the variables you use.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|