} //Kommentare if ($apx->is_module('comments') && $set['news']['coms'] && $res['allowcoms']) { require_once BASEDIR . getmodulepath('comments') . 'class.comments.php'; $coms = new comments('news', $res['id']); $coms->assign_comments($parse); if (!news_is_recent($res['id']) && !$set['news']['archcoms']) { $apx->tmpl->assign('COMMENT_NOFORM', 1); } } //Bewertungen if ($apx->is_module('ratings') && $set['news']['ratings'] && $res['allowrating']) { require_once BASEDIR . getmodulepath('ratings') . 'class.ratings.php'; $rate = new ratings('news', $res['id']); $rate->assign_ratings($parse); if (!news_is_recent($res['id']) && !$set['news']['archratings']) { $apx->tmpl->assign('RATING_NOFORM', 1); } } $apx->tmpl->parse('detail'); require 'lib/_end.php'; } //////////////////////////////////////////////////////////////////////////////////////////////////////// NEWS AUFLISTEN //Titelleiste headline($apx->lang->get('HEADLINE'), mklink('news.php', 'news.html')); titlebar($apx->lang->get('HEADLINE')); //Verwendete Variablen auslesen $parse = $apx->tmpl->used_vars('index'); //Kategorie-Baum holen $cattree = news_tree($_REQUEST['catid']); //Seitenzahlen generieren
function news_showcomments($id) { global $set, $db, $apx, $user; $id = (int) $id; $res = $db->first("SELECT id,allowcoms FROM " . PRE . "_news WHERE ( id='" . $id . "' " . section_filter() . " ) LIMIT 1"); if (!$apx->is_module('comments') || !$set['news']['coms'] || !$res['allowcoms']) { return; } require_once BASEDIR . getmodulepath('comments') . 'class.comments.php'; $coms = new comments('news', $id); $coms->assign_comments(); if (!news_is_recent($id) && !$set['news']['archcoms']) { $apx->tmpl->assign('COMMENT_NOFORM', 1); } $apx->tmpl->parse('comments', 'comments'); require 'lib/_end.php'; }