PHP Code:
$toppostersquery = $DB_site->query("
SELECT
userid,
username,
COUNT(*) as weekpostcount
FROM
post
WHERE
dateline > (UNIX_TIMESTAMP() - 7*24*60*60)
GROUP BY
username,
userid
ORDER BY
weekpostcount DESC
LIMIT 5
");
while ($topposters = $DB_site->fetch_array($toppostersquery))
{
eval("\$toppostersbit = \"".gettemplate('topposters_7days')."\";");
}
Then you'd use something like in the topposters_7days template:
Code:
<b>$topposters[username]</b> -$topposters[posts]
Untested but that should do it for you