The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
How to I create a custom global variable in vb4?
I want to create some custom variables, that I can use site-wide in any template I throw it in.
This was easy to do in VB3, creating a plugin under global_start - that kind of works in VB4 however I can't call on any of the variables in my CMS Anyone know how this can be accomplished? |
#2
|
|||
|
|||
You could try using global_bootstrap_init_start instead. That's inside a function so you'll need to declare your variables as global if you want to access them from elsewhere (but not if you just want to register them to use in templates).
|
Благодарность от: | ||
N8 |
#3
|
||||
|
||||
How does one "declare your variables as global"
Or better, where can I learn about that function? I can't seem to be able to find any information about that on vb.com |
#4
|
|||
|
|||
I'm just talking about the PHP 'global' statement, like:
PHP Code:
Just put that in your code before you use the variable; |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|