PDA

View Full Version : Datastore fetch again...


Disasterpiece
10-05-2010, 12:45 PM
Hi

My Problem is equivalent to this vb4 related: https://vborg.vbsupport.ru/showthread.php?t=250923

Now, I want to port my plugin to vb3 as well.
Unfortunately, this method doesn't give me any results at all:

$vbulletin->datastore->do_db_fetch("'my_plugin'");
After fetching the datastore item via this command, the variable $vbulletin->my_plugin is NULL.
In the datastore database table, I can see that the data has been stored there successfully, only the "get-data-from-datastore" seems to fail at the moment.

Any help on this?

Boofo
10-05-2010, 10:23 PM
I use this in the init_startup hook for my spiders display mod:

if (THIS_SCRIPT == 'index')
{
$datastore_fetch[] = "'wol_spiders'";
}

Paul M
10-06-2010, 12:15 AM
The do_db_fetch() should work anywhere.

Boofos method will also work (and I believe it would also work on vb4).

Boofo
10-06-2010, 12:25 AM
Yes, it works for both vb3 and vb4.

BirdOPrey5
10-09-2010, 11:17 PM
The problem is global_state_check is not a valid hook in VB3.