} else { $xoopsTpl->assign('pagenav', ''); } } else { $xoopsOption['template_main'] = 'news_by_topic.html'; include_once XOOPS_ROOT_PATH . '/header.php'; $xoopsTpl->assign('columnwidth', intval(1 / $column_count * 100)); if ($xoopsModuleConfig['ratenews']) { $xoopsTpl->assign('rates', true); $xoopsTpl->assign('lang_ratingc', _NW_RATINGC); $xoopsTpl->assign('lang_ratethisnews', _NW_RATETHISNEWS); } else { $xoopsTpl->assign('rates', false); } $xt = new NewsTopic(); $alltopics =& $xt->getTopicsList(true, $xoopsModuleConfig['restrictindex']); $smarty_topics = array(); $topicstories = array(); foreach ($alltopics as $topicid => $topic) { $allstories = NewsStory::getAllPublished($xoopsModuleConfig['storyhome'], 0, $xoopsModuleConfig['restrictindex'], $topicid); foreach ($allstories as $thisstory) { $topicstories[$topicid][] = $thisstory->prepare2show($sfiles); } if (isset($topicstories[$topicid])) { $smarty_topics[$topicstories[$topicid][0]['posttimestamp']] = array('title' => $topic['title'], 'stories' => $topicstories[$topicid], 'id' => $topicid, 'topic_color' => $topic['color']); } } krsort($smarty_topics); $columns = array(); $i = 0; foreach ($smarty_topics as $thistopictimestamp => $thistopic) {