![]() |
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? |
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. |
Okay, here are my plugins, which are not working (or at least no flags are showing up):
showthread_start PHP Code:
PHP Code:
|
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 |
Update: When I switched from using the $vbulletin->db commands to just using mysql_ commands everything worked. ^^
|
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. |
All times are GMT. The time now is 03:31 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|