$i = 0; foreach ($smarty_topics as $thistopictimestamp => $thistopic) { $columns[$i][] = $thistopic; $i++; if ($i == $column_count) { $i = 0; } } //$xoopsTpl->assign('topics', $smarty_topics); $xoopsTpl->assign('columns', $columns); } /** * Create the website navigation's bar */ if (getmoduleoption('sitenavbar')) { $content = CreateSiteNavBar(); $xoopsTpl->assign("xoops_module_header", $content); } /** * Create a clickable path from the root to the current topic (if we are viewing a topic) * Actually this is not used in the default templates but you can use it as you want * You can comment the code to optimize the requests count */ if ($xoopsOption['storytopic']) { $mytree = new XoopsTree($xoopsDB->prefix("topics"), "topic_id", "topic_pid"); $topicpath = $mytree->getNicePathFromId($xoopsOption['storytopic'], "topic_title", "index.php?op=1"); $xoopsTpl->assign('topic_path', $topicpath); unset($mytree); } /** * Create a link for the RSS feed (if the module's option is activated)
if ($next != -1) { $xoopsTpl->assign('next_story_title', $nexttitle); $hcontent .= sprintf("<link rel=\"Next\" title=\"%s\" href=\"%s/\" />\n", $nexttitle, XOOPS_URL . '/modules/news/article.php?storyid=' . $next); } $xoopsTpl->assign('lang_previous_story', _NW_PREVIOUS_ARTICLE); $xoopsTpl->assign('lang_next_story', _NW_NEXT_ARTICLE); unset($tmparticle); } else { $xoopsTpl->assign('nav_links', false); } /** * Create the website navigation's bar */ $sitenavbar = getmoduleoption('sitenavbar'); if ($sitenavbar) { $xoopsTpl->assign("xoops_module_header", CreateSiteNavBar()); } /** * Enable users to vote * * According to a module's option, "ratenews", you can display a link to rate the current news * The actual rate in showed (and the number of votes) * Possible modification, restrict votes to registred users */ if (getmoduleoption('ratenews')) { $xoopsTpl->assign('rates', true); $xoopsTpl->assign('lang_ratingc', _NW_RATINGC); $xoopsTpl->assign('lang_ratethisnews', _NW_RATETHISNEWS); $story['rating'] = number_format($article->rating(), 2); if ($article->votes == 1) { $story['votes'] = _NW_ONEVOTE;