Oto fragment lastcommets.php:
<? function link_news() { if ($conf_url == "yes") { $link_news = "http://". $_SERVER['HTTP_HOST'] ."/"; } else { $url = $news_id; $link_news = "http://". $_SERVER['HTTP_HOST'] ."/index.php?newsid="; } return $link_news; } $query_comm_temp = "SELECT * FROM " . PREFIX . "_comments ORDER BY date DESC LIMIT " . $comm_num.";"; $query_comm = $db->query($query_comm_temp); while ($comment = $db->get_row($query_comm)) { $comment_tpl = "<table width=100% border=0 cellpadding=0 cellspacing=0><tr><td style='padding-top: 4px;'>Autor: "; $comment_tpl .= "<a href=". link_user($comment['autor']).">". $comment['autor']."</a> W artykule:</td></tr><tr><td style='border-bottom: 1px solid #d1d7dc; padding-bottom: 4px;'>"; $query_news_temp = "SELECT * FROM ". PREFIX ."_post WHERE id=". $comment['post_id'] .";"; $query_news = $db->query($query_news_temp); while ($novost = $db->get_row($query_news)) { else $news = $novost['title']; if ($conf_url == "yes") { } else { $ssilka = $novost['id']; } if ($hint == "yes") $hint_show = "onMouseover=\"showhint('<b>Treść:</b><br>".$comment_text."', this, event, '200px')\""; $comment_tpl .= lastcomm_getscript()."<a href=\"".link_news().$ssilka."\"". $hint_show .">".$news. "</a></td></tr></table>"; } $ready_tpl .= $comment_tpl; } $lastcomment = $ready_tpl; ?>
Tutaj fragment kodu który działa tak jak chcę z modułu topnews (link jest taki sam jak w oryginale)
$db->query( "SELECT id, title, date, alt_name, category, flag FROM " . PREFIX . "_post WHERE approve='1' AND date >= '$this_month' - INTERVAL 1 MONTH AND date < '$this_month' ORDER BY rating DESC, comm_num DESC, news_read DESC, date DESC LIMIT 0,10" ); while ( $row = $db->get_row() ) { if( $config['allow_alt_url'] == "yes" ) { if( $row['flag'] and $config['seo_type'] ) { if( $row['category'] and $config['seo_type'] == 2 ) { $full_link = $config['http_home_url'] . get_url( $row['category'] ) . "/" . $row['id'] . "-" . $row['alt_name'] . ".html"; } else { $full_link = $config['http_home_url'] . $row['id'] . "-" . $row['alt_name'] . ".html"; } } else { $full_link = $config['http_home_url'] . date( 'Y/m/d/', $row['date'] ) . $row['alt_name'] . ".html"; } } else { $full_link = $config['http_home_url'] . "index.php?newsid=" . $row['id']; } else $title = $row['title']; $go_page = ($config['ajax']) ? "onclick=\"DlePage('newsid=" . $row['id'] . "'); return false;\" " : ""; if( $config['allow_comments_wysiwyg'] == "yes" ) $go_page = ''; $topnews .= "» " . $link . "<br />"; }
Próbowalem zmianiać i wstawiać kod w lastcomments z top news ale nawet kiedy wkleję caly top news do lastcomments i zmienię wygląd linka na taki jak ma być to nie wie co to (( $row['category'] ) . "/" . $row['id'] . "-" . $row['alt_name'])
Z góry dzięki za pomoc
