if ($_GET['diy'] == 'yes' && $topic['uid'] != $_G['uid'] && !$_G['group']['allowmanagetopic']) { $_GET['diy'] = ''; showmessage('topic_edit_nopermission'); } if (!empty($_G['setting']['makehtml']['flag']) && $topic['htmlmade'] && !isset($_G['makehtml']) && empty($_GET['diy'])) { dheader('location:' . fetch_topic_url($topic)); } $topicid = intval($topic['topicid']); C::t('portal_topic')->increase($topicid, array('viewnum' => 1)); $navtitle = $topic['title']; $metadescription = empty($topic['summary']) ? $topic['title'] : $topic['summary']; $metakeywords = empty($topic['keyword']) ? $topic['title'] : $topic['keyword']; $attachtags = $aimgs = array(); list($seccodecheck, $secqaacheck) = seccheck('publish'); if (isset($_G['makehtml'])) { helper_makehtml::portal_topic($topic); } $file = 'portal/portal_topic_content:' . $topicid; $tpldirectory = ''; $primaltplname = $topic['primaltplname']; if (strpos($primaltplname, ':') !== false) { list($tpldirectory, $primaltplname) = explode(':', $primaltplname); } $topicurl = fetch_topic_url($topic); include template('diy:' . $file, NULL, $tpldirectory, NULL, $primaltplname); function portaltopicgetcomment($topcid, $limit = 20, $start = 0) { global $_G; $topcid = intval($topcid); $limit = intval($limit); $start = intval($start);