Example #1
0
        	$story['topic_separator'] =  ( $thisstory->textlink() != '' ) ? _MA_NW_SP : '';
        	$story['topic_color'] = '#'.$myts->displayTarea($thisstory->topic_color);
	       	if($firsttitle=='') {
       			$firsttitle=$myts->htmlSpecialChars($thisstory->topic_title()) . ' - ' .  $myts->htmlSpecialChars($thisstory->title());
       		}
        	$columns[$k][] = $story;
        	$k++;
        	if ($k == $column_count) {
	            $k = 0;
        	}
		}
	}
	$xoopsTpl->assign('columns', $columns);
	unset($story);

	$totalcount = nw_NewsStory::countPublishedByTopic($xoopsOption['storytopic'], $xoopsModuleConfig['restrictindex']);
    if ( $totalcount > $scount ) {
        include_once XOOPS_ROOT_PATH.'/class/pagenav.php';
		$pagenav = new XoopsPageNav($totalcount, $xoopsOption['storynum'], $start, 'start', 'storytopic='.$xoopsOption['storytopic']);
		if(nw_isbot()) { 		// A bot is reading the news, we are going to show it all the links so that he can read everything
        	$xoopsTpl->assign('pagenav', $pagenav->renderNav($totalcount));
        } else {
            $xoopsTpl->assign('pagenav', $pagenav->renderNav());
    	}
    } else {
        $xoopsTpl->assign('pagenav', '');
    }
} else {	// Affichage par sujets
    $xoopsOption['template_main'] = 'nw_news_by_topic.html';
    include_once XOOPS_ROOT_PATH.'/header.php';