vBulletin Modifications

How do I fetch info from datastore inside a plugin?

Welcome to vBHackers.com! - vBHackers Updates:

Go Back   vBulletin Modifications > General vBulletin Section > General vBulletin Discussion

Reply
 
LinkBack Thread Tools
Old 07-17-2006, 10:26 PM   #1
vB Newbie
Join Date: Apr 2005
Kriminal is on a distinguished road

Default How do I fetch info from datastore inside a plugin?

I want to show stats from my board, like it's explained in this mod: http://www.vbulletin.org/forum/showthread.php?t=95493
But, I want to save 3 of the 5 queries, refreshing stats every 5 minutes.
So, the only two stats whose stays "live" are the "online now"; the other 3 (total threads, total posts and total members) will be updated every 5 minutes and saved in datastore.

I did the following steps:
1) Create a ministats.php inside cron folder:
You must first be a registered member to view any code.
2) Create a cron task to execute the php. I noticed that it works (the stats are saved in datastore table)

3) Create a plugin that:
a - execute a sql query to fetch the online members
b - retrieve info from datastore

The plugins is allocated in "global_start" hook, and this is the code:
You must first be a registered member to view any code.
The online members info retrieves correctly, but the info from datastore not.
So, my question is: how I do to fetch that info in the plugin?

Thanks in advance,




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cache System Explanation (datastore) Ken Iovino vBulletin Modification Tutorials 19 05-13-2006 04:56 PM


All times are GMT -3. The time now is 03:10 AM.


SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc. (Patent Pending)