fetch_threadpost_by_tid_invisible($_GET['tid']); if($thread['cover']) { $picurl = getthreadcover($thread['tid'], $thread['cover']); } else { $attach = C::t('forum_attachment_n')->fetch_all_by_id('tid:'.$_GET['tid'], 'pid', array($post['pid']), '', true); $picurl = ''; if($attach) { $attach = array_shift($attach); $picurl = ($attach['remote'] ? $_G['setting']['ftp']['attachurl'] : $_G['setting']['attachurl']).'forum/'.$attach['attachment']; } } $data = array( 'name' => lang('plugin/wechat', 'resource_thread_push').': '.$thread['subject'], 'data' => array( 'title' => $thread['subject'], 'pic' => $picurl ? (preg_match('/^http:/', $picurl) ? '' : $_G['siteurl']).$picurl : '', 'desc' => messagecutstr($post['message'], 0, 120), 'content' => nl2br(messagecutstr($post['message'])), 'url' => $_G['siteurl'].'forum.php?mod=viewthread&tid='.$_GET['tid'], ), ); C::t('#wechat#mobile_wechat_resource')->insert($data); showmessage('wechat:resource_msg_pushed', '', array(), array('alert' => 'right'));