. .
pragmaMx Support Forum 25 Mai 2012, 10:49:03 *
Willkommen Gast. Bitte einloggen oder registrieren.


Einloggen mit Benutzername und Passwort
News:
Brauchen Sie Hilfe? Bitte nutzen Sie unsere Suchfunktion bevor Sie Beiträge oder Fragen ins Board schreiben! Viele Fragen wurden bereits gestellt und beantwortet. Danke!
 
Übersicht Hilfe Forenregeln / Boardrules
 
Suche
Seiten: [1]   Nach unten
Drucken
Autor Thema: [Solved] big story today limit  (Gelesen 814 mal)
0 Mitglieder und 1 Gast betrachten dieses Thema.
ahura
öfter hier
**
Offline Offline

Geschlecht: Männlich
Beiträge: 62


WWW
« am: 12 Juli 2007, 19:38:34 »

i wanto show 5 most view article. i tried to change limit of big story of today block but it still show 1 article.

how to make 5 most viewed article block?
Gespeichert
JoergK
Inventar
*******
Offline Offline

Geschlecht: Männlich
Beiträge: 2.204

JoergK


« Antworten #1 am: 12 Juli 2007, 22:49:04 »

You're on the right way, but there are some more changes necessary.  Wink

1. Change the limit (line ~47)
from
Zitat
$result = sql_query("select sid, title from ${prefix}_stories where (time LIKE '%$tdate%') AND `time` <= now() $querylang order by counter DESC limit 0,1");
to
Zitat
$result = sql_query("select sid, title from ${prefix}_stories where (time LIKE '%$tdate%') AND `time` <= now() $querylang order by counter DESC limit 0,5");
In my opinion, that's what you've done already. Wink

2. Add this code
Zitat
while (list($fsid, $ftitle) = sql_fetch_row($result));
    $content .= '<br><a href="modules.php?name=News&amp;file=article&amp;sid='.$fsid.'">'.$ftitle.' </a>';
}
at the end of this file bevor the last brace "}" (line ~55).
Gespeichert

Gruß,
Jörg

Nobody is perfect ... so don't call me Nobody

Hier noch was zum Lesen und Lernen
HTML, JavaScript & CSS: SelfHTML
PHP: SelfPHP und PHP-Handbuch
MySQL: MySQL 5.1 Handbuch
Seiten: [1]   Nach oben
Drucken
 
Gehe zu:  

Powered by SMF 1.1.16 | SMF © 2011, Simple Machines
design by hENNE, layout based on YAML