maybe some one wants to know the final code:
* open index.php and find this:
PHP Code:
if (!empty($iforumperms)) {
$iforumperms = 'AND forumid=' . implode(' OR forumid=', $iforumperms);
}
* replace it with:
PHP Code:
if (!empty($iforumperms)) {
$iforumperms = 'AND forumid=' . implode(' OR forumid=', $iforumperms);
}
// top 10 thread starters
$topts=$DB_site->query("SELECT COUNT(threadid) AS threads, username, postuserid FROM thread LEFT JOIN user ON(user.userid=thread.postuserid) WHERE thread.open<>10 GROUP BY thread.postuserid ORDER BY threads DESC LIMIT 10");
$toptsbits = "";
while($topt=$DB_site->fetch_array($topts)) {
$threadcount=$topt['threads'];
$topusername=$topt['username'];
$userid=$topt['postuserid'];
eval("\$toptsbits .= \"".gettemplate('forumhome_topts')."\";");
}
$DB_site->free_result($topts);
* creat new template, called: forumhome_topts with this content:
PHP Code:
<a href="member.php?s=$session[sessionhash]&action=getinfo&userid=$userid">$topusername</a> : $threadcount<br>
* open the template 'Forum Home Page Templates/forumhome' and then write $toptsbits anywhere you want to show the top 10 thread starters.
just in case
thanks to Xenon