![]() |
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 |
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. |
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 :) |
Try hook location 'global_start'.
|
Quote:
|
What template are you trying to access the variable in? Because it should work.
|
Quote:
POSTBIT, and a custom one. for postbit, it works in postbit_display_complete, but not global_start |
What version of vBulletin are you using?
|
Quote:
|
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. |
All times are GMT. The time now is 10:34 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|