![]() |
Variable set in GLOBAL_COMPLETE plugin is empty in POSTBIT_LEGACY template
When I set a variable with a plugin in global_complete, for instance like this:
Quote:
|
The postbit is evaluated inside a function, so the variable won't have scope there.
You could always give it global scope inside one postbit hooks (postbit_dipslay_start) or use $GLOBALS[variable] instead of $variable in your template. Here is the PHP version PHP Code:
|
I'm a little confused about your instructions. I tried *only* using $GLOBALS[variable] in the postbit, and that didn't work. You're saying the other option is to *only* add a new plugin at postbit_display_start with contents "global $variable;"? Or am I mistaken?
Thanks. |
Correct. Both should work though.
|
I tried them and neither worked. If you could possibly help test, I am using this product: https://vborg.vbsupport.ru/showthread.php?t=129418 and using the variable $banner_no in the postbit.
Nevermind… got it to work Thanks! |
All times are GMT. The time now is 07:58 AM. |
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:
|