Forum. MyNuke.ru

Forum. MyNuke.ru (http://forum.mynuke.ru/index.php)
-   Модули (http://forum.mynuke.ru/forumdisplay.php?f=17)
-   -   модуль news Связанные ссылки (http://forum.mynuke.ru/showthread.php?t=1550)

kentbrn 17.03.2006 22:31

модуль news Связанные ссылки
 
кто посдкажет как сделать чтоб в модуле новостей в "Связанные ссылки" отображалось определенное число ссылок на новости "Самая читаемая новость ".... !? в стандарте идет 1 ссылку.. пробовал изменять article.php
$row9 = $db->sql_fetchrow($db->sql_query("select sid, title from ".$prefix."_stories where topic='$topic' $querylang order by counter desc limit 0,1"));
ничего не вышло!

Soniks 18.03.2006 17:51

найдите:
PHP код:
 $row9 $db->sql_fetchrow($db->sql_query("select sid, title from ".$prefix."_stories where topic='$topic$querylang order by counter desc limit 0,1"));
 
$topstory intval($row9['sid']);
 
$ttitle filter($row9['title'], "nohtml");
 
 
$boxstuff .= "<a href=\"modules.php?name=$module_name&file=article&sid=$topstory\">$ttitle</a></font></center><br>\n"

замените на:
PHP код:
 $row9 $db->sql_query("select sid, title from ".$prefix."_stories where topic='$topic$querylang order by counter desc limit 0,5");
while (list(
$topstory,$ttitle) = $db->sql_fetchrow($row9)){
 
$topstory intval($topstory);
 
$ttitle filter($ttitle"nohtml"); 
 
$boxstuff .= "<a href=\"modules.php?name=$module_name&file=article&sid=$topstory\">$ttitle</a></font></center><br>\n";


kentbrn 18.03.2006 21:06

работает , спасибо ;)


Часовой пояс GMT +4, время: 08:19.

Copyright © 2005 by Soniks