If you want a query that returns the number of posts made by a particular user during the last week, you could use:
PHP Code:
$posts_this_week = $vbulletin->db->query_first("
SELECT COUNT(*) AS post_count
FROM " . TABLE_PREFIX . "post AS post
WHERE userid = " . $userinfo['userid'] . "
AND dateline >= " . (TIMENOW - 7*86400)
);
$prepared[poststhisweek] = $posts_this_week['post_count'];
Then you could run this query once a week. If you want to run a query that counts the posts made by all users during the last week, let me know.