Quote:
Originally posted by JJR512
But there is still one problem left: I am at the top of the list, but the second person has more posts than I do.
|
Frankly, I like to have 2 type stats:
based on all posts & based on user counted posts
But if you prefer the last one
change in topposters to
Code:
$toppost1=$DB_site->query("SELECT *
FROM user
ORDER BY posts DESC
LIMIT $toppostmax");
$bgcolor="{firstaltcolor}";
while ($user1=$DB_site->fetch_array($toppost1)) {
$result_1=$DB_site->query_first("SELECT COUNT(*) AS threads
FROM thread WHERE postuserid=$user1[userid]");
$threads1=$result_1['threads'];
$topposters1.="<tr><td width=100% bgcolor=$bgcolor><smallfont><a href=\"member.php?action=getinfo&userid=$user1[userid]\">$user1[username]</a></td><td bgcolor=$bgcolor align=right nowrap><smallfont>$user1[posts] / </smallfont></td><td bgcolor=$bgcolor align=right><smallfont>$threads1</smallfont></td></tr>";
if ($bgcolor=="{firstaltcolor}") {
$bgcolor="{secondaltcolor}";
} else {
$bgcolor="{firstaltcolor}";
}
}