The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Need help getting setting value in postbit_display_start hook?
I have an issue that impacts vBulletin 3.7.3 which does not seem to impact 3.6.11 that has me stumped.
Specifically, I want to use a setting in an add-on product in a vBulletin template hook. The template hook I am working with is the postbit and postbit legacy and here are the specific details: Plugin off hook: postbit_display_start When I add the following code in 3.7.3: PHP Code:
Quote:
Quote:
Obviously, my variable I want to use is a configuration option for "Show this in PostBit and PostBit Legacy" but literally no variables seem to be working? It worked in a previous version of vBulletin 3.7 (I think I had it in 3.7.1 and it worked) but not in the current version and I am stumped! |
#2
|
|||
|
|||
Make sure the $vbulletin variable is a valid registry object...it could be possible that you are in a class (making the correct variable $this->registry instead of $vbulletin). Also, you should be using quotes around string array indexes.
Eg: PHP Code:
|
#3
|
|||
|
|||
Quote:
Thanks! I did try both with and without the single string in my frustration... So, I was supposed to be using the $this->registry instead as my new test code: PHP Code:
Quote:
PHP Code:
Thanks for the help as I was really stumped! |
#4
|
|||
|
|||
postbit_display_start is executed within a class so $this->registry should/will work on both versions...
|
#5
|
|||
|
|||
You are correct! I did test that so I could have one version of code and it did work in 3.6.11 and 3.7.3!
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|