PHP Code:
<?php
// ### COLLAPSABLE ENABLING ########################################
$collapseobj_toposters = $vbcollapse['collapseobj_toprep'];
$collapseimg_toposters = $vbcollapse['collapseimg_toprep'];
$top_stats = array();
// TOP REPUTATIONists
$top_rep = $DB_site->query("SELECT * FROM ".TABLE_PREFIX."user ORDER BY reputation DESC LIMIT 10");
while($top_rep = $DB_site->fetch_array($top_rep))
unset($top_rep);
$DB_site->free_result($top_rep);
eval('$top_stats[\'top_rep\'] .= "' . fetch_template('toprep') . '";');
eval('$home[$mods[\'modid\']][\'content\'] = "' . fetch_template('adv_portal_toprep') . '";');
?>
these are my templates:
toprep
PHP Code:
<li><span class="smallfont"><a href="member.php?u=$toprep[userid]">$toprep[username]</a> ($toprep[reputation])</span></li>
adv_portal_toprep
PHP Code:
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder"width="180px">
<thead>
<tr>
<td class="tcat">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('toprep')"><img id="collapseimg_toprep" src="$stylevar[imgdir_button]/collapse_tcat$collapseimg_toprep.gif" alt="" border="0" /></a>
<span class="smallfont"><b>$vboptions[blockbullet]<a href="$vboptions[bburl]/profile.php?$session[sessionurl]do=editlist"> Top Reputations</a></b></span></td>
</tr>
</thead>
<tbody id="collapseobj_toprep" style="$collapseobj_toprep">
<tr class="alt1">
<td width="100%"><span class="smallfont">
$top_stats[top_rep]
</td>
</tr>
</tbody>
</table>
<br />
suppose to show top 10 users with the most reputation... but doesnt for some reason..