if (!$gperm_handler->checkRight('news_view', $article->topicid(), $groups, $xoopsModule->getVar('mid'))) { redirect_header(XOOPS_URL . '/modules/news/index.php', 3, _NOPERM); exit; } $storypage = isset($_GET['page']) ? intval($_GET['page']) : 0; $dateformat = news_getmoduleoption('dateformat'); $hcontent = ''; /** * update counter only when viewing top page and when you are not the author or an admin */ if (empty($_GET['com_id']) && $storypage == 0) { if (is_object($xoopsUser)) { if ($xoopsUser->getVar('uid') == $article->uid() || news_is_admin_group()) { // nothing ! ;-) } else { $article->updateCounter(); } } else { $article->updateCounter(); } } $xoopsOption['template_main'] = 'news_article.html'; include_once XOOPS_ROOT_PATH . '/header.php'; $story['id'] = $storyid; $story['posttime'] = formatTimestamp($article->published(), $dateformat); $story['news_title'] = $article->title(); $story['title'] = $article->textlink() . ' : ' . $article->title(); $story['topic_title'] = $article->textlink(); $story['text'] = $article->hometext(); $bodytext = $article->bodytext(); if (xoops_trim($bodytext) != '') {