The Function build_datastore also has a 3rd parameter which should be mentioned, as it seems all serialized data in the datastore table requires a value of 1...
PHP Code:
#######################################################
/**
* Saves the specified data into the datastore
* @param string The name of the datastore item to save
* @param mixed The data to be saved
* @param integer 1 or 0 as to whether this value is to be automatically unserialised on retrieval
*/
function build_datastore($title = '', $data = '', $unserialize = 0)
By setting the 3rd param to true, it's no longer necessary to run unserialize like this:
$vbulletin->dropmenu = unserialize($vbulletin->dropmenu);
There'fore we can just access the info from the datastore like this:
PHP Code:
$vbulletin->dropmenu['id']