The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#31
|
||||
|
||||
I think we're good for now. If I run my select at showthread_start and simply save everything to $countries, will that be accessible by my plugin in the postbit?
After testing, it seems no matter where I put the $countries selection it does not execute. Do sql executions not work in plugins? |
#32
|
|||
|
|||
I do queries all the time with them. As long as your query comes after the file has required global.php you'll have a database connection. Do you have a function that needs $countries? Use "global $countries;" in it.
If your plugin is inside an existing vbulletin function (and I suspect it is) you have to get $countries inside the function. You could use the line $vbulletin->countries = $countries; after your query and then refer to it that way in your plugin, or if that doesn't work refer to it as $this->registry->countries in your plugin. |
#33
|
||||
|
||||
Okay, here are my plugins, which are not working (or at least no flags are showing up):
showthread_start PHP Code:
PHP Code:
|
#34
|
|||
|
|||
I'm not very good with sql. What are your actual field names? I would try using those instead of 0 and 1.
And try $result = $vbulletin->db->query_read_slave($sql); $db doesn't always work but $vbulletin->db should |
#35
|
||||
|
||||
Update: When I switched from using the $vbulletin->db commands to just using mysql_ commands everything worked. ^^
|
#36
|
|||
|
|||
That's strange. When you require global.php it requires various other files such as includes/core.php which has all the database stuff.
Glad you got it working. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|