Quote:
Originally Posted by kingMOB
Thank you very much XManuX =) Will try it later.
Anyway to output the results in real time? Or at least weekly?
What about modify it to the most viewed articles? =)
|
Results are updated each time you refresh the page. Using Ajax to refresh them without reloading the page could be cool but a huge backend would be required ...
To display most viewed instead of most rated, replace this :
Code:
, ".TABLE_PREFIX."cms_nodeinfo.ratingtotal
with :
Code:
, ".TABLE_PREFIX."cms_nodeinfo.viewcount
Then replace this :
Code:
ORDER BY ".TABLE_PREFIX."cms_nodeinfo.ratingtotal DESC LIMIT $limit
with:
Code:
ORDER BY ".TABLE_PREFIX."cms_nodeinfo.viewcount DESC LIMIT $limit
Replace:
Code:
$rating = $articleinfo['ratingtotal'];
with:
Code:
$views = $articleinfo['viewcount'];
And finally replace:
Code:
<span class=\"cmsrating rating{$rating}\"></span>
with:
Code:
Viewed $views times.