![]() |
Hook & Variable Question
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; Any ideas? thanks kirsty |
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. |
Where [later on] are you trying to use it ?
|
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 :D thanks kirsty |
All times are GMT. The time now is 07:27 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:
|