The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
I have spent most of my night trying to debug my product and finally zero'd in on a problem that users have been reporting since vB 4.0.2. I wasn't able to find any documentation or bug related issues so I figured I'd ask the forum in general if anyone knew.
For a very small portion of the people who use my product, the stored data in vbulletin settings are not working correctly in plugins. For nearly 95% of the users on hooks, I can use something like: $grab = $vbulletin->options['market_gift_postbit'] And $grab would get the correct numerical or data value stored in the vbulleting database settings. However, for that remaining 5% of the users, it absolutely refuses to find out what $grab is and I cannot figure out why. It's been an issue since vbulletin version 4.0.2. The above example for those 5% of users would display nothing if I decided to echo it out or use it in an if statement, regardless of what data is stored. The vbulletin settings are working perfectly fine on my files, the problem is only occurying when I try to use the above example in a plugin such as postbit_display_complete. Any help/advise would be appreciated. |
#2
|
||||
|
||||
![]()
You need to make sure $vbulletin is in scope. You may need to make $vbulletin global at the top of your plugin code. (Or, it could be the $vbulletin is just the wrong variable - if you look at that hook location, you'll see that $this->registry may be the way to call the setting ie. $this->registry->options['market_gift_postbit']. When in doubt, go find the hook location and look at the code around it.
|
#3
|
|||
|
|||
![]()
Try doing some cross diagnosis between the forums that are causing your product to malfunction:
Are the x% of forums experiencing problems running the same version of vB ? Do they have any of the same third-party products installed? etc,etc... This will help determine if it's a vBulletin version incompatibility or a conflict with another product perhaps. |
#4
|
||||
|
||||
![]()
Ok I did a far more pinpoint after 8 hours of adding, testing, editing, and deleting code and here is what I have found. On the postbit plugins (postbit_display_start and postbit_display_complete) the usage of mysql is not working. So to test it to the extreme, I uninstalled my product and had a blank version of vBulletin.
I created a test plugin in postbit_display_complete: PHP Code:
|
#5
|
||||
|
||||
![]()
If you show the errors, you'll see this error with that call:
Code:
Fatal error: Call to a member function fetch_array() on a non-object in /home/thetradersden/public_html/vb4_suite2/includes/class_postbit.php(321) : eval()'d code on line 39 |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|