function _viewthread_bottom_output() { if (!$this->allow) { return; } global $_G; if ($GLOBALS['page'] == 1 && $GLOBALS['postlist'][$_G['forum_firstpid']]['invisible'] == 0) { return tpl_viewthread_bottom(); } }
function _viewthread_bottom_output() { if (!$this->allow) { return; } global $_G, $thread, $rushreply, $postlist, $page; $uids = $openids = array(); foreach ($postlist as $pid => $post) { if ($post['anonymous']) { continue; } if ($post['authorid']) { $uids[$post['authorid']] = $post['authorid']; } } foreach (C::t('#qqconnect#common_member_connect')->fetch_all($uids) as $connect) { if ($connect['conisqqshow'] && $connect['conopenid']) { $openids[$connect['uid']] = $connect['conopenid']; } } foreach ($postlist as $pid => $post) { if (getstatus($post['status'], 5)) { $matches = array(); preg_match('/\\[tthread=(.+?),(.+?)\\](.*?)\\[\\/tthread\\]/', $post['message'], $matches); if ($matches[1] && $matches[2]) { $post['message'] = preg_replace('/\\[tthread=(.+?)\\](.*?)\\[\\/tthread\\]/', lang('plugin/qqconnect', 'connect_tthread_message', array('username' => $matches[1], 'nick' => $matches[2])), $post['message']); } $post['authorid'] = 0; $post['author'] = lang('plugin/qqconnect', 'connect_tthread_comment'); $post['avatar'] = $matches[3] ? '<img src="' . $matches[3] . '/120' . '">' : '<img src="' . $_G['siteurl'] . '/static/image/common/tavatar.gif">'; $post['groupid'] = '7'; $postlist[$pid] = $post; continue; } if ($post['anonymous']) { continue; } } if ($page == 1 && $postlist[$_G['forum_firstpid']]['invisible'] == 0) { $jsurl = ''; if (!$_G['cookie']['connect_last_sync_t'] && $_G['uid'] && $_G['setting']['connect']['t']['reply'] && !$thread['closed'] && !$rushreply && getstatus($_G['forum_thread']['status'], 14)) { $jsurl = $_G['connect']['discuz_sync_tthread_url'] . '&tid=' . $thread['tid']; dsetcookie('connect_last_sync_t', 1, 600); } return tpl_viewthread_bottom($jsurl); } }