I changed the following query:
PHP Code:
$cub_tpim_get = $vbulletin->db->query_read_slave("
SELECT COUNT(post.dateline) AS cybpcount, post.userid, user.username, user.usergroupid, post.visible, user.posts, user.joindate
FROM " . TABLE_PREFIX . "post AS post
LEFT JOIN " . TABLE_PREFIX . "user AS user ON (post.userid = user.userid)
WHERE post.visible = '1' AND post.dateline > $fromtime AND post.dateline < $totime $cybexclgroups
GROUP BY userid
ORDER BY cybpcount
DESC LIMIT $nrofresults
");
I changed it to:
Quote:
WHERE post.visible = '1' AND post.dateline > $fromtime AND post.dateline < $totime $cybexclgroups AND post.userid != 0
|
I allow some Guest posts. These were being included in the original script with blank usernames. This took care of the problem.