que tal, este MOD no es original mio, unicamente lo publico al español. el autor es Loda y la correccion es por V@no.
archivos a utilizar:- includes/
page_header.phptemplates/<your templates>/
home.html paso 1:localiza en
includes/page_header?>
agrega antes:
$sql = "SELECT user_comments, user_name, user_id FROM ".USERS_TABLE."
WHERE user_level >= '".USER."'
ORDER BY user_comments DESC
LIMIT 25";
$result = $site_db->query($sql);
while ($row = $site_db->fetch_array($result)) {
$last_action_user_list .= '<a href ="'.$site_sess->url(ROOT_PATH.'member.php?action=showprofile&user_id='.$row['user_id']).'"><b>'.$row['user_name'].'</b></a> <span class="smalltext">'.$row['user_comments'].'</span><br>';
}
$site_template->register_vars(array(
"user_comments_list" => $last_action_user_list,
));
unset($user_comments_list);
NOTA:Si no deseas mostrar 25, si no unicamente el top 10 solo edita:
LIMIT 25";
a:
LIMIT 10";
paso 2:inserta donde lo desees en templates/<your templates>/
home.html
<table border="0" cellspacing="1" cellpadding="1" background="{template_url}/images/cat.gif" width="100%">
<tr>
<td height="20" background="{template_url}/images/back1.gif">
<b>Top 25 commenter </b></td>
</tr>
<tr>
<td class="row1">{user_comments_list}</td>
</tr>
</table>
espero que les sea de mucha ayuda!
saludos,
paburmester