Ce méta-mot permet d'afficher les 15 articles les plus lus, de la rubrique ayant l'ID 8
Les valeurs 15 et 8 peuvent être changée
function MM_top_rubriqueID($catid, $arg) {
global $NPDS_Prefix;
$content="";
$arg = arg_filter($arg);
$catid = arg_filter($catid);
$result = sql_query("select sid, catid, title, counter, time, informant from ".$NPDS_Prefix."stories
WHERE catid='$catid' order by counter DESC limit 0,$arg");
while (list($sid, $artid, $title, $counter, $time, $informant) = sql_fetch_row($result)) {
$rowcolor = tablos();
$content.="<table><tr $rowcolor><td style="float:left; width:200px">
- <a href="article.php?sid=$sid">".aff_langue($title)."</a>
<td style="float:left;width:45px;text-align:right"> ".wrh($counter)." ".translate("times")."</td>
</tr></table>";
$lugar++;
}
sql_free_result($result);
return($content);
}