The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I feel like I'm missing something *very* obvious here.
I have some extra user variables I want to be able to access from any page on the site, so I'm trying to set them in the global_start hook on v3.6.5. But no matter what I do I can't see the variables later on. E.g. if I just add a very basic plugin on the global_start hook: Code:
global $myvariable; $myvariable = "boo!"; Any ideas? thanks kirsty |
#2
|
|||
|
|||
![]()
Hi Kirsty
I've had this happen a number of times and muddled through until i've sorted it. Which template are you trying to access the variable from? Try accessing it from a really basic template like header first. |
#3
|
||||
|
||||
![]()
Where [later on] are you trying to use it ?
|
#4
|
|||
|
|||
![]()
I got it all to work in the end.
I think it wasn't working because one of the lines I'd commented out hadn't been fully commented out so there was half a line of PHP causing an error, which just seemed to stop the hook from being run whilst everything else carried on regardless. I knew it would end up being something silly. If this should have produced an error message somewhere let me know so I'll know next time ![]() thanks kirsty |
![]() |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|