SELECT COUNT(post.dateline) AS postcount, post.userid, user.username
FROM " . TABLE_PREFIX . "post AS post
LEFT JOIN " . TABLE_PREFIX . "user AS user ON (post.userid = user.userid)
WHERE dateline > $startp AND user.usergroupid IN ($groupsp)
GROUP BY userid ORDER BY postcount DESC LIMIT 10
Just pulling that out of the thread without actually looking into the rest of the code... what you would need to change would be the $starttp variable somewhere before this, just set that to = 24 hours ago.
So your pulling a count of posts made in the last 24 hours, ordered by the postcount from highest to lowest (DESC) and only the top 10 (DESC 10)
Quote:
A separate table that I could display in my left column (and note that it only updates every hour) or one that I would have to give its own page? Would you be able to teach me how to set up the cron job?
By seperate table I mean a new table in your database, not a html table... just to clarify there. Cron jobs can be done with the admincp as "Scheduled Tasks"
So the process that I would likely use is:
1 - Set up a table in your database to store whatever info you want to be able to pull and stick on your site.
2 - Write a scheduled task to update the table every hour.
3 - Use the table to draw from to pull the info you need, format it and plop it into your site.
Not easy if you don't know php or sql, but not terribly risky in that it doesn't involve changing any of vbulletins tables and fairly simple as possible solutions go.
Interesting idea though, might be a way to get posters posting a little more (competing for top spot) There are other ways to do this, better ways too, but also more complex in terms of what you would have to do