I'm new at the datastore stuff myself so I know what you are going through. I did a hack for my site that uses the datastore to retrieve top poster, top thread starter, etc. The code I gave you is from that. Paul M and cheesgrits helped me get to the point of it working like it should.
Here is how I do it:
glossary_links[datastoreitem]
and it display the piece of info from the datastore I have entered into it. Here is how I set it up to add the info to the db.
Code:
$options = array(
'arcadegames' => 1,
'arcadecats' => 1,
'getthreadviews' => 1,
'topposter' => 1,
'topposterid' => 1,
'toppostercount' => 1,
'topposterpercent' => 1,
'topstarter' => 1,
'topstarterid' => 1,
'topstartercount' => 1,
'topthreadspercent' => 1,
'getfileviewsun' => 1,
'getfileviewsid' => 1,
'getfileviews' => 1,
'ref2' => 1,
'topreferrerid' => 1,
'ref' => 1,
'lastupdate' => 1,
);
build_datastore('statscache', serialize($options),1);
That is the install code query I run when setting up the hack. You would put glossary_links where I have statscache.
And here is the uninstall code I use:
Code:
DELETE FROM " . TABLE_PREFIX . "datastore WHERE title = 'statscache' LIMIT 1