Note that you can "easily" modify it to have the "best rated articles of this month"
1?) Add this in the SELECTed fields :
Code:
, ".TABLE_PREFIX."cms_nodeinfo.ratingtotal
2?) Add this condition in your request to limit results to the current month (and year) :
Code:
AND (MONTH(FROM_UNIXTIME(".TABLE_PREFIX."cms_node.publishdate))=MONTH(NOW()) AND YEAR(FROM_UNIXTIME(".TABLE_PREFIX."cms_node.publishdate))=YEAR(NOW()))
3?) Replace the ORDER part :
Code:
ORDER BY ".TABLE_PREFIX."cms_node.publishdate DESC LIMIT $limit
with:
Code:
ORDER BY ".TABLE_PREFIX."cms_nodeinfo.ratingtotal DESC LIMIT $limit
4?) In the While (where all variables are initialized) :
Code:
$rating = $articleinfo['ratingtotal'];
5?) Add somewhere in the $output string definition:
Code:
<span class=\"cmsrating rating{$rating}\"></span>
Regards.