The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Plugin Variables, and Templates Help
Hiya, i was trying to make a plugin which would display in any template on my site. i simplified the plugin to:
vBulletin global_start $mytestvariable = "Hello World"; and then placed the $mytestvariable variable into my template, but it would not show. Anyone know how i can create a variable that i can use on any page? Thanks in advance |
#2
|
||||
|
||||
I put the PHP in the hook location, to where i want my variable.
If that makes sense, for example, if i wanted to display the variable on the forum home, i would choose the location "forumhome_start". That should work. |
#3
|
||||
|
||||
Quote:
Yep that makes sense, however what i need is the variable to be available on all pages, including my custom pages (well, page) - is that possable? if not, i could code the plugin into my custom page - where would i put the hook for displaying threads? ps, cheers for the reply |
#4
|
||||
|
||||
Try hook location 'global_start'.
|
#5
|
||||
|
||||
Quote:
|
#6
|
||||
|
||||
What template are you trying to access the variable in? Because it should work.
|
#7
|
||||
|
||||
Quote:
POSTBIT, and a custom one. for postbit, it works in postbit_display_complete, but not global_start |
#8
|
||||
|
||||
What version of vBulletin are you using?
|
#9
|
||||
|
||||
Quote:
|
#10
|
||||
|
||||
Weird. I always assumed that global_start was... well, global.
I guess you'll just have to use postbit_display_start. For your Custom Page, it'd probably be simpler to just include the PHP code within the file itself, rather than using hooks. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|