} $topic_perm = $gperm->get_viewtopic_perm_of_current_user($story['topicid'], $article->getVar('uid')); $story = array_merge($story, $topic_perm); $story['type'] = $article->getVar('type'); // Assign a number of comments $ccount = $article->getVar('comments'); if ($ccount == 0) { $story['comentstotal'] = _MD_COMMENTS; } elseif ($ccount == 1) { $story['comentstotal'] = _MD_ONECOMMENT; } else { $story['comentstotal'] = sprintf(_MD_NUMCOMMENTS, $ccount); } //Assign the user information $story['uid'] = $article->getVar('uid'); $story['uname'] = $article->getUname(); $story['realname'] = $article->getRealname(); $story['morelink'] = ''; $story['adminlink'] = 0; if ($xoopsUser && $xoopsUser->isAdmin($xoopsModule->getVar('mid'))) { $story['adminlink'] = 1; } if ($article->showTopicimg()) { $story['topic_url'] = $article->imglink($bulletin_topicon_path); $story['align'] = $article->getTopicalign(); } // Related article if ($bulletin_use_relations) { $relations = $article->getRelated(); foreach ($relations as $relation) { $relation_asign = array();
<?php $com_itemid = isset($_GET['com_itemid']) ? intval($_GET['com_itemid']) : 0 ; // If there are no articles if( !Bulletin::isPublishedExists( $mydirname , $com_itemid) ){ redirect_header($mydirurl.'/index.php',2,_MD_NOSTORY); exit(); } $article = new Bulletin( $mydirname , $com_itemid); $gperm =& BulletinGP::getInstance($mydirname) ; if( ! $gperm->proceed4topic('can_read',$article->getVar('topicid')) ){ redirect_header($mydirurl.'/index.php',2,_NOPERM); exit(); } $com_replytext = _POSTEDBY.' <b>'.$article->getUname().'</b> '._DATE.' <b>'.formatTimestamp($article->getvar('published')).'</b><br /><br />'.$article->getVar('hometext'); $bodytext = $article->getDividedBodytext(); if ($bodytext != '') { $com_replytext .= '<br /><br />'.$bodytext.''; } $com_replytitle = $article->getVar('title'); $_GET['page'] = 'article'; require XOOPS_ROOT_PATH.'/include/comment_new.php'; ?>