The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Using the Database object in the postbit_display_complete hook
I'm trying to select something from the database in the postbit_display_complete hook using the database object. I am able to successfully access it using the following syntax:
vB::$db->query_read_slave(... The problem is I cannot use this syntax in vBulletin 3.7, and I want the product I am making to work in both versions. What I want to do is use: $vbulletin->db->query_real_slave(... However with this syntax I am getting the error, "Fatal error: Call to a member function query_read_slave() on a non-object in..." I find this strange because I am able to use the $vbulletin object just fine in the newpost_process hook. Any help would be greatly appreciated. Thanks in advance. |
#2
|
||||
|
||||
Why does it have to be the same for 3.7 and 4.x? Your template syntax will most likely not be the same at all.
|
#3
|
|||
|
|||
It would be nice if it was all one file, at the moment that is the only piece that needs to be fixed, otherwise it works in both versions.
|
#4
|
||||
|
||||
In my vB4 mods, with that hook, I use:
$this->registry->db->query_read_slave so perhaps that will work with both versions. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|