maverick - Here is how you can add the top X posters...
Open your myvbindex.php and look for:
PHP Code:
$topposter=$DB_site->query_first("SELECT userid,username,posts FROM user ORDER BY posts DESC LIMIT 1");
Remove that line, then look for:
// Forum Permissions
Right above that line, add:
PHP Code:
$topposters=$DB_site->query("SELECT userid,username,posts FROM user ORDER BY posts DESC LIMIT 10");
while ($tposter=$DB_site->fetch_array($topposters)) {
eval("\$posterbits .= \"".gettemplate('index_topposterbits')."\";");
}
eval("\$topposters = \"".gettemplate('index_topposters')."\";");
Then you will want to create a new template called
index_topposters with the following content:
PHP Code:
<table cellpadding="{ tableouterborderwidth}" cellspacing="0" border="0" bgcolor="{ tablebordercolor}" { tableouterextra} width="100%"><tr><td>
<table cellpadding="4" cellspacing="{ tableinnerborderwidth}" border="0" { tableinnerextra} width="100%">
<tr id="cat"><td bgcolor="{ tableheadbgcolor}"><smallfont color="{ categoryfontcolor}"><b>Top Posters</b></smallfont></td></tr>
<tr><td bgcolor="$getbgrow"><smallfont>$posterbits
</smallfont></td></tr></form></table></td></tr></table><p>
(Be sure to remove the space after each { in that template)
Then create a template called
index_topposterbits with the following content:
PHP Code:
<a href="$bburl/member.php?s=$session[sessionhash]&action=getinfo&userid=$topposters[userid]">$tposter[username]</a> ($tposter[posts])<br>
Then just add the variable $topposters in your index template where you would like the "top posters box" to appear. You may also want to remove the top poster part in the stats section too.
Oh, and that's set up to display the top 10 posters for your forum. If you would like to change that number, just change the part "DESC LIMIT 10" in the code you added to whatever you would like the number to be.