[Solved] big story today limit

Begonnen von ahura, 12 Juli 2007, 19:38:34

⏪ vorheriges - nächstes ⏩

0 Mitglieder und 1 Gast betrachten dieses Thema.

ahura

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?

JoergK

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

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. ;)

2. Add this code
Zitatwhile (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).
Gruß,
Jörg


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