View Full Version : find people with most posts in a period of time
HI,
I am planning to have a posting contest on my site. The way to play it is to have member post as many posts as they can. After a month or 3 weeks, people with most posts will win, and will recieve a gift from our sponsor. This is the game
I am looking for a hack that can search members with the most post (top 10 members with most posts)
For example
search from June 5th to July 5th, and find top 10 members with the most posts.
Is there a hack like this? Thank you
<?php
error_reporting(7);
require("./global.php");
// how many users would like to display?
$usernum="10";
// path to your vBulletin? (no trailing slash please)
$pathtovb="http://www.wannabebigforums.com";
// timeframe? (in days)
$days="7";
$userlist="";
$datecut=time()-($days*24*60*60);
$allusers=$DB_site->query("SELECT userid,username,COUNT(postid) AS count FROM post WHERE dateline>='$datecut' AND userid<>'0' GROUP BY userid ORDER BY count DESC LIMIT $usernum");
while ($user=$DB_site->fetch_array($allusers)) {
$userlist.="<tr>\n <td align=\"center\" bgcolor=\"#ffffff\" style=\"color: #000000; font-family: Verdana,Helvetica,sans-serif; font-size: 8pt\"><a href=\"/member.php?&action=getinfo&userid=$user[userid]\" style=\"color: #336699\">$user[username]</a></td>\n <td align=\"center\" bgcolor=\"#ffffff\" style=\"color: #000000; font-family: Verdana,Helvetica,sans-serif; font-size: 8pt\">$user[count]</td>\n</tr>\n";
}
echo "<table>";
echo "$userlist";
echo "</table>";
?>
I finally able to find a little script that was written 2 years ago. This will do it (I think)
I was reading other hacks like "top 10 posters" and similar one. Yes, they do count who got the most posts, but it seems they don't have a function that search only posts on the last XX days. If I am wrong, please let me know!
Thank you
cajunboy2208
03-25-2007, 06:42 PM
Can someone tell me where to insert this script? Or how to use this?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.