I've done this before many months ago for my forum, but took it out. But you are free to use it.
In index.php, assuming you have installed the Statistic hack -
Find (approximately code that looks like this):
PHP Code:
//Top 10 Thread Starters
$toptstarter=$DB_site->query("SELECT COUNT(*) AS count,postuserid,postusername FROM thread WHERE postuserid<>0 GROUP BY postuserid ORDER BY count DESC LIMIT 10");
while ($topt5top = mysql_fetch_array($toptstarter)):
++$topt5topnbsp;
$topt5name .= "<a href=member.php?s=$session[sessionhash]&action=getinfo&userid=$topt5top[postuserid]>$topt5top[postusername]</a><br>";
$topt5post .= "$topt5top[count]<br>";
endwhile;
BELOW, ADD:
PHP Code:
//Top 10 Most Points - Erwin
$toppoints = $DB_site->query('
SELECT user.userid, username, fieldXX
FROM user
LEFT JOIN userfield USING (userid)
ORDER BY fieldXX DESC LIMIT 10
');
while ($topb5top = mysql_fetch_array($toppoints)):
++$topb5topnbsp;
$topbname .= "<a href=member.php?s=$session[sessionhash]&action=getinfo&userid=$topb5top[userid]>$topb5top[username]</a><br>";
$topbpost .= "$topb5top[fieldXX]<br>";
endwhile;
Replace the XX in fieldXX (which occurs 3 times) to the profile field id for your points.
Then, in your Top10 statistics template (whatever it is called), add this to the template:
Find:
Code:
<TD width="25%" valign="top">
<smallfont>
<b>Top 10 Thread Starters:</b>
<table>
<tr>
<td width=100%><smallfont>User Names:</smallfont></td>
<td align="right"><smallfont>Threads:</smallfont></td>
</tr>
<tr>
<td width=100%><smallfont><b>$topt5name</b></smallfont></td>
<td align="right"><smallfont><b>$topt5post</b></smallfont></td>
</tr>
</table>
</smallfont></td>
BELOW, ADD:
Code:
<TD width="25%" valign="top">
<smallfont>
<b>Top 10 Most Points:</b>
<table>
<tr>
<td width=100%><smallfont>User Names:</smallfont></td>
<td align="right"><smallfont>Points:</smallfont></td>
</tr>
<tr>
<td width=100%><smallfont><b>$topbname</b></smallfont></td>
<td align="right"><smallfont><b>$topbpost</b></smallfont></td>
</tr>
</table>
</smallfont></td>
It worked on my site when I used it.