* @copyright: Copyright (c) 2010, Bunzia Alexander * @version: 1.0 * @license: http://www.gnu.org/copyleft/gpl.html GNU/GPL * @package: ÏîÐåìîíòó.Ðó */ function news_most_comments($options){ $t = new PHPTAL( false ); $t -> setSource(TMPL_NEWS_MOSTCOMMENTS_BLOCK); include_once(MAIN_SOURCE_PATH.'/modules/news/inc/url.php'); include_once(MAIN_SOURCE_PATH.'/modules/news/inc/class.news.php'); $n = new news_q('n'); $n -> orderby_count_comments('DESC'); $n -> set_page(1); $n -> set_count_rows(8); $n -> where_active(1); //$n -> set_debug(1); $n -> get('n_title,n_alias as news_url',false); $rows = array(); while( $row = $n -> row() ){ $rows[]=$row; } $t -> rows = $rows; $t -> URL_NEWS_MCOMMENTS_LISTING = URL_NEWS_MCOMMENTS_LISTING; return $t -> execute(); } define('TMPL_NEWS_MOSTCOMMENTS_BLOCK','

${B_NEWS_MCOMMENTS_LISTING}

' ); ?>