Code der Artikel-Stat-Navbox für Top-News anpassen
Hallo Leute.
ich habe mal eine Frage. Ich habe das Article-Stats- Addon und dort werden mir mit der Datei "last_articles.php" die letzten News aus festgelegten Kategorien angezeigt. Wie muss ich diese nun aber ändern (für eine weitere Newsdatei) dass er mir die letzten drei Top-News nach Klickzahl und eine Zeitraumbegrenzung von einer Woche anzeigt. Also quasi eine Anzeige von drei am meisten geklickten News in einer Woche.
So sieht die Datei bisher aus:
Hier klicken für weitere Informationen
PHP-Quelltext
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php
$contentcat_cache=contentcats();
$getcontentinfo=$DB->query("SELECT content_teaser, ".$db_tab['content'].".content_id, ".$db_tab['content'].".content_cat, ".$db_tab['content'].".content_title, ".$db_tab['content'].".content_time, ".$db_tab['content'].".content_text FROM ".$db_tab['content']." LEFT JOIN ".$db_tab['contentcat']." ON ".$db_tab['contentcat'].".contentcat_id=".$db_tab['content'].".content_cat WHERE contentcat_id IN (89,101,109,114) AND ".$db_tab['content'].".content_option=2 AND
".$db_tab['content'].".content_status=1 AND (".$db_tab['content'].".content_expire>'".$time_now."' OR ".$db_tab['content'].".content_expire='0') AND ".$db_tab['content'].".content_time<'".$time_now."' AND ".sqlrights("".$db_tab['contentcat'].".contentcat_rights")." ORDER by ".$db_tab['content'].".content_time DESC LIMIT 6");
while ($contentinfo=$DB->fetch_array($getcontentinfo)) {
$row=rowcolor($row);
$contentcatinfo=$contentcat_cache[0][$contentinfo['content_cat']];
$contentcat_title=stripslashes($contentcatinfo['contentcat_name']);
$content_teaser;
$content_time=formattime($contentinfo['content_time']);
$content_text=substr(strip_tags($PARSE->parse($contentinfo['content_header']." ".$contentinfo['content_text'],1,1,1,1)),0,170);
$content_title=stripslashes($contentinfo['content_title']);
eval ("\$site_body.= \"".templateinclude("articlesstat/articles_status_lastfiles2")."\";");
}
?>