The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Plugin COnditional
Why would $vbulletin->options['product_setting'] not evaluate in a plugin, but $GLOBALS['vbulletin']->options['product_setting'] does evaluate?
I thought they were the same, and that all $vbulletin->options[] is available for use in plugins? Many thanks |
#2
|
||||
|
||||
$vbulletin is not available in the local scope of where that hook is located. I suggest you have a read about variable scope, the PHP manual is pretty good.
Depending on the hook location, inside class objects, you will usually be able to access the variable through $this->registry->options. |
#3
|
|||
|
|||
I'm actually wanting to add a setting to a product so an admin can choose whether or not to display information in the postbit.
I'm trying to check the value of this option in a plugin on the postbit_display_complete hook. |
#4
|
||||
|
||||
My post still applies.
|
#5
|
|||
|
|||
That it does - I was just supplying more information.
Your suggestion of $this->registry->options['product_setting'] does indeed work as suggested. Many thanks! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|