本文整理汇总了PHP中setthreadcover函数的典型用法代码示例。如果您正苦于以下问题:PHP setthreadcover函数的具体用法?PHP setthreadcover怎么用?PHP setthreadcover使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setthreadcover函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: post_produce_cover_message
function post_produce_cover_message($params)
{
global $_G, $tid, $pid, $threadimageaid, $message, $imglist;
list($msg, $url_forward, $values, $extraparam) = $params['param'];
$wf_forum_limit = unserialize($_G['cache']['plugin']['singcere_waterfall']['wf_forum_limit']);
if ($msg == 'post_newthread_succeed') {
require_once libfile('function/post');
if (in_array($_G[fid], $wf_forum_limit) && !$_G['forum']['picstyle']) {
if (!setthreadcover($pid, 0, $threadimageaid)) {
preg_match_all("/(\\[img\\]|\\[img=\\d{1,4}[x|\\,]\\d{1,4}\\])\\s*([^\\[\\<\r\n]+?)\\s*\\[\\/img\\]/is", $message, $imglist, PREG_SET_ORDER);
$values['coverimg'] = "<p id=\"showsetcover\">" . lang('message', 'post_newthread_set_cover') . "<span id=\"setcoverwait\"></span></p><script>if(\$('forward_a')){\$('forward_a').style.display='none';setTimeout(\"\$('forward_a').style.display=''\", 5000);};ajaxget('forum.php?mod=ajax&action=setthreadcover&tid={$tid}&pid={$pid}&fid={$_G['fid']}&imgurl={$imglist[0][2]}&newthread=1', 'showsetcover', 'setcoverwait')</script>";
$param['clean_msgforward'] = 1;
$param['timeout'] = $param['refreshtime'] = 15;
showmessage($msg, "forum.php?mod=viewthread&tid={$tid}", $values, $param);
}
}
return true;
} else {
if ($msg == 'post_edit_succeed') {
global $thread, $message;
if (in_array($_G[fid], $wf_forum_limit) && !$_G['forum']['picstyle']) {
if (empty($thread['cover'])) {
$rtn = setthreadcover($pid, 0, $threadimageaid);
} else {
$rtn = setthreadcover($pid, $_G['tid'], 0, 1);
}
if (!$rtn) {
preg_match_all("/(\\[img\\]|\\[img=\\d{1,4}[x|\\,]\\d{1,4}\\])\\s*([^\\[\\<\r\n]+?)\\s*\\[\\/img\\]/is", $message, $imglist, PREG_SET_ORDER);
$values['coverimg'] = "<p id=\"showsetcover\">" . "<span id=\"setcoverwait\"></span></p><script>if(\$('forward_a')){\$('forward_a').style.display='none';setTimeout(\"\$('forward_a').style.display=''\", 5000);};ajaxget('forum.php?mod=ajax&action=setthreadcover&tid={$_G['tid']}&pid={$pid}&fid={$_G['fid']}&imgurl={$imglist[0][2]}&newthread=1', 'showsetcover', 'setcoverwait')</script>";
$param['clean_msgforward'] = 1;
$param['timeout'] = $param['refreshtime'] = 15;
showmessage(lang('plugin/singcere_waterfall', 'post_edit_succeed'), "forum.php?mod=viewthread&tid={$_G['tid']}", $values, $param);
}
}
return true;
} else {
if ($msg == 'post_reply_succeed' && $_GET['handlekey'] == 'k_reply') {
showmessage(lang('plugin/singcere_waterfall', 'reply_success'), null, array(), array('showdialog' => 0, 'showmsg' => false, 'closetime' => 0.0001, 'extrajs' => '<script>addreply(\'' . $_G['tid'] . '\', ' . $_G['uid'] . ', \'' . $_G['member']['username'] . '\', \'' . $message . '\'); updatetotalnum(\'' . $_G['tid'] . '\', 0, 0, 0, 1);</script>'));
}
}
}
}
示例2: dunserialize
if ($_G['setting']['forumpicstyle']) {
$_G['setting']['forumpicstyle'] = dunserialize($_G['setting']['forumpicstyle']);
empty($_G['setting']['forumpicstyle']['thumbwidth']) && ($_G['setting']['forumpicstyle']['thumbwidth'] = 214);
empty($_G['setting']['forumpicstyle']['thumbheight']) && ($_G['setting']['forumpicstyle']['thumbheight'] = 160);
} else {
$_G['setting']['forumpicstyle'] = array('thumbwidth' => 214, 'thumbheight' => 160);
}
require_once libfile('function/post');
$coversql = empty($allthread) ? 'AND cover=\'0\'' : '';
$cover = empty($allthread) ? 0 : null;
$_G['forum']['ismoderator'] = 1;
foreach (C::t('forum_thread')->fetch_all_by_fid_cover_lastpost($fid, $cover, $starttime, $endtime, $current, $pertask) as $thread) {
$processed = 1;
$pid = C::t('forum_post')->fetch_threadpost_by_tid_invisible($thread['tid'], 0);
$pid = $pid['pid'];
setthreadcover($pid);
}
if ($processed) {
cpmsg("{$lang['counter_thread_cover']}: " . cplang('counter_processing', array('current' => $current, 'next' => $next)), $nextlink, 'loading');
} else {
cpmsg('counter_thread_cover_succeed', 'action=counter', 'succeed');
}
} else {
shownav('tools', 'nav_updatecounters');
showsubmenu('nav_updatecounters');
showtips('counter_tips');
showformheader('counter');
showtableheader();
showsubtitle(array('', 'counter_amount'));
showhiddenfields(array('pertask' => ''));
showtablerow('', array('class="td21"'), array("{$lang['counter_forum']}:", '<input name="pertask1" type="text" class="txt" value="15" /><input type="submit" class="btn" name="forumsubmit" onclick="this.form.pertask.value=this.form.pertask1.value" value="' . $lang['submit'] . '" />'));
示例3: get_thread_by_tid
$tid = $threadimage['tid'];
$pid = $threadimage['pid'];
}
if ($tid && $pid) {
$thread = get_thread_by_tid($tid);
} else {
$thread = array();
}
if (empty($thread) || !$_G['forum']['ismoderator'] && $_G['uid'] != $thread['authorid']) {
if ($_GET['newthread']) {
showmessage('set_cover_faild', '', array(), array('msgtype' => 3));
} else {
showmessage('set_cover_faild', '', array(), array('closetime' => 3));
}
}
if (setthreadcover($pid, $tid, $aid, 0, $imgurl)) {
if (empty($imgurl)) {
C::t('forum_threadimage')->delete_by_tid($threadimage['tid']);
C::t('forum_threadimage')->insert(array('tid' => $threadimage['tid'], 'attachment' => $threadimage['attachment'], 'remote' => $threadimage['remote']));
}
if ($_GET['newthread']) {
showmessage('set_cover_succeed', '', array(), array('msgtype' => 3));
} else {
showmessage('set_cover_succeed', '', array(), array('alert' => 'right', 'closetime' => 1));
}
}
}
if ($_GET['newthread']) {
showmessage('set_cover_faild', '', array(), array('msgtype' => 3));
} else {
showmessage('set_cover_faild', '', array(), array('closetime' => 3));
示例4: SetAttachment
public function SetAttachment($aid_Img, $aid, $tid, $pid, $_G, $threadimage)
{
if (empty($aid_Img)) {
$threadimageaid = $aid;
if ($aid) {
$tableid = getattachtableid($tid);
$query = get_forum_attachment_unused($aid);
while ($attach = DB::fetch($query)) {
$aids = $attach['aid'];
$data = $attach;
}
$uid = $_G['uid'];
update_forum_attachment($tid, $tableid, $uid, $pid, $aids);
$data['uid'] = 1;
$data['tid'] = $tid;
$data['pid'] = $pid;
C::t('forum_attachment_n')->insert($tableid, $data);
}
$values = array('fid' => $_G['fid'], 'tid' => $tid, 'pid' => $pid, 'coverimg' => '');
$param = array();
if ($_G['forum']['picstyle']) {
if (!setthreadcover($pid, 0, $threadimageaid)) {
preg_match_all("/(\\[img\\]|\\[img=\\d{1,4}[x|\\,]\\d{1,4}\\])\\s*([^\\[\\<\r\n]+?)\\s*\\[\\/img\\]/is", $message, $imglist, PREG_SET_ORDER);
$values['coverimg'] = "<p id=\"showsetcover\">" . lang('message', 'post_newthread_set_cover') . "<span id=\"setcoverwait\"></span></p><script>if(\$('forward_a')){\$('forward_a').style.display='none';setTimeout(\"\$('forward_a').style.display=''\", 5000);};ajaxget('forum.php?mod=ajax&action=setthreadcover&tid={$tid}&pid={$pid}&fid={$_G['fid']}&imgurl={$imglist[0][2]}&newthread=1', 'showsetcover', 'setcoverwait')</script>";
$param['clean_msgforward'] = 1;
$param['timeout'] = $param['refreshtime'] = 15;
}
}
if ($threadimageaid) {
if (!$threadimage) {
$threadimage = C::t('forum_attachment_n')->fetch('tid:' . $tid, $threadimageaid);
}
$threadimage = daddslashes($threadimage);
C::t('forum_threadimage')->insert(array('tid' => $tid, 'attachment' => $threadimage['attachment'], 'remote' => $threadimage['remote']));
}
} else {
$isInsertForumImage = false;
foreach ($aid_Img as $key => $val) {
$threadimageaid = $val;
if ($val) {
$tableid = getattachtableid($tid);
$query = DB::query("SELECT * FROM %t WHERE aid=%d", array('forum_attachment_unused', $val));
while ($attach = DB::fetch($query)) {
$aids = $attach['aid'];
$data = $attach;
}
DB::query("UPDATE %t SET tid=%d,tableid=%d,uid=%d,pid=%d WHERE aid IN (%n)", array('forum_attachment', $tid, getattachtableid($tid), $_G['uid'], $pid, $aids));
$data['uid'] = 1;
$data['tid'] = $tid;
$data['pid'] = $pid;
C::t('forum_attachment_n')->insert($tableid, $data);
}
$values = array('fid' => $_G['fid'], 'tid' => $tid, 'pid' => $pid, 'coverimg' => '');
$param = array();
if ($_G['forum']['picstyle']) {
if (!setthreadcover($pid, 0, $threadimageaid)) {
preg_match_all("/(\\[img\\]|\\[img=\\d{1,4}[x|\\,]\\d{1,4}\\])\\s*([^\\[\\<\r\n]+?)\\s*\\[\\/img\\]/is", $message, $imglist, PREG_SET_ORDER);
$values['coverimg'] = "<p id=\"showsetcover\">" . lang('message', 'post_newthread_set_cover') . "<span id=\"setcoverwait\"></span></p><script>if(\$('forward_a')){\$('forward_a').style.display='none';setTimeout(\"\$('forward_a').style.display=''\", 5000);};ajaxget('forum.php?mod=ajax&action=setthreadcover&tid={$tid}&pid={$pid}&fid={$_G['fid']}&imgurl={$imglist[0][2]}&newthread=1', 'showsetcover', 'setcoverwait')</script>";
$param['clean_msgforward'] = 1;
$param['timeout'] = $param['refreshtime'] = 15;
}
}
if (!$isInsertForumImage && $threadimageaid) {
if (!$threadimage) {
$threadimage = C::t('forum_attachment_n')->fetch('tid:' . $tid, $threadimageaid);
}
$threadimage = daddslashes($threadimage);
C::t('forum_threadimage')->insert(array('tid' => $tid, 'attachment' => $threadimage['attachment'], 'remote' => $threadimage['remote']));
$isInsertForumImage = true;
}
}
}
}
示例5: convertunusedattach
if ($_G['gp_activityaid']) {
$threadimageaid = $_G['gp_activityaid'];
convertunusedattach($_G['gp_activityaid'], $_G['tid'], $pid);
DB::query("UPDATE " . DB::table('forum_activity') . " SET aid='{$_G['gp_activityaid']}' WHERE tid='{$_G['tid']}'");
}
}
if ($isfirstpost && $attachupdate) {
if (!$threadimageaid) {
$threadimage = DB::fetch_first("SELECT aid, attachment, remote FROM " . DB::table(getattachtablebytid($_G['tid'])) . " WHERE pid='{$pid}' AND isimage IN ('1', '-1') ORDER BY width DESC LIMIT 1");
$threadimageaid = $threadimage['aid'];
}
if ($_G['forum']['picstyle']) {
if (empty($thread['cover'])) {
setthreadcover($pid, 0, $threadimageaid);
} else {
setthreadcover($pid, $_G['tid'], 0);
}
}
if ($threadimageaid) {
if (!$threadimage) {
$threadimage = DB::fetch_first("SELECT attachment, remote FROM " . DB::table(getattachtablebytid($_G['tid'])) . " WHERE tid='{$_G['tid']}' AND isimage IN ('1', '-1') ORDER BY width DESC LIMIT 1");
}
DB::delete('forum_threadimage', "tid='{$_G['tid']}'");
$threadimage = daddslashes($threadimage);
DB::insert('forum_threadimage', array('tid' => $_G['tid'], 'attachment' => $threadimage['attachment'], 'remote' => $threadimage['remote']));
}
}
$feed = array();
if ($special == 127) {
$message .= chr(0) . chr(0) . chr(0) . $specialextra;
}
示例6: convertunusedattach
$threadimageaid = $_G['gp_activityaid'];
convertunusedattach($_G['gp_activityaid'], $tid, $pid);
}
if ($_G['forum']['threadsorts']['types'][$sortid] && !empty($_G['forum_optiondata']) && is_array($_G['forum_optiondata']) && $sortaids) {
foreach ($sortaids as $sortaid) {
convertunusedattach($sortaid, $tid, $pid);
}
}
if (($_G['group']['allowpostattach'] || $_G['group']['allowpostimage']) && ($_G['gp_attachnew'] || $sortid || !empty($_G['gp_activityaid']))) {
updateattach($displayorder == -4 || $modnewthreads, $tid, $pid, $_G['gp_attachnew']);
if (!$threadimageaid) {
$threadimage = DB::fetch_first("SELECT aid, attachment, remote FROM " . DB::table(getattachtablebytid($tid)) . " WHERE tid='{$tid}' AND isimage IN ('1', '-1') ORDER BY width DESC LIMIT 1");
$threadimageaid = $threadimage['aid'];
}
if ($_G['forum']['picstyle']) {
setthreadcover($pid, 0, $threadimageaid);
}
}
if ($threadimageaid) {
if (!$threadimage) {
$threadimage = DB::fetch_first("SELECT attachment, remote FROM " . DB::table(getattachtablebytid($tid)) . " WHERE aid='{$threadimageaid}'");
}
$threadimage = daddslashes($threadimage);
DB::insert('forum_threadimage', array('tid' => $tid, 'attachment' => $threadimage['attachment'], 'remote' => $threadimage['remote']));
}
$param = array('fid' => $_G['fid'], 'tid' => $tid, 'pid' => $pid);
$statarr = array(0 => 'thread', 1 => 'poll', 2 => 'trade', 3 => 'reward', 4 => 'activity', 5 => 'debate', 127 => 'thread');
include_once libfile('function/stat');
updatestat($isgroup ? 'groupthread' : $statarr[$special]);
dsetcookie('clearUserdata', 'forum');
if ($specialextra) {
示例7: showmessage
$threadimage = DB::fetch_first("SELECT tid, pid, attachment, remote FROM " . DB::table(getattachtablebyaid($aid)) . " WHERE aid='{$aid}'");
if ($threadimage['tid'] && $threadimage['pid']) {
$firstpost = DB::result_first("SELECT first FROM " . DB::table(getposttablebytid($threadimage['tid'])) . " WHERE pid='{$threadimage['pid']}'");
if (empty($firstpost)) {
$trade_aid = DB::result_first("SELECT aid FROM " . DB::table('forum_trade') . " WHERE pid='{$threadimage['pid']}'");
if ($trade_aid == $aid) {
$firstpost = 1;
}
}
} else {
$firstpost = 0;
}
if (empty($firstpost)) {
showmessage('set_cover_faild', '', array(), array('closetime' => 3));
}
if (setthreadcover(0, 0, $aid)) {
$threadimage = daddslashes($threadimage);
DB::delete('forum_threadimage', "tid='{$threadimage['tid']}'");
DB::insert('forum_threadimage', array('tid' => $threadimage['tid'], 'attachment' => $threadimage['attachment'], 'remote' => $threadimage['remote']));
showmessage('set_cover_succeed', '', array(), array('alert' => 'right', 'closetime' => 1));
}
}
showmessage('set_cover_faild', '', array(), array('closetime' => 3));
} elseif ($_G['gp_action'] == 'editor') {
$editorid = 'e';
$_G['setting']['editoroptions'] = str_pad(decbin($_G['setting']['editoroptions']), 2, 0, STR_PAD_LEFT);
$editormode = $_G['setting']['editoroptions'][0];
$allowswitcheditor = $_G['setting']['editoroptions'][1];
$editor = array('editormode' => $editormode, 'allowswitcheditor' => $allowswitcheditor, 'allowhtml' => 0, 'allowsmilies' => $_G['forum']['allowsmilies'], 'allowbbcode' => $_G['forum']['allowbbcode'], 'allowimgcode' => $_G['forum']['allowimgcode'], 'allowcustombbcode' => 0, 'allowchecklength' => 0, 'allowtopicreset' => 0, 'allowresize' => 1, 'textarea' => 'message', 'simplemode' => !isset($_G['cookie']['editormode_' . $editorid]) ? $_G['setting']['editoroptions'][2] : $_G['cookie']['editormode_' . $editorid]);
loadcache('bbcodes_display');
$_G['forum']['allowpostattach'] = isset($_G['forum']['allowpostattach']) ? $_G['forum']['allowpostattach'] : '';
示例8: getPublishPollObj
//.........这里部分代码省略.........
$data = array('tid' => $tid, 'multiple' => $pollarray['multiple'], 'visible' => $pollarray['visible'], 'maxchoices' => $pollarray['maxchoices'], 'expiration' => $pollarray['expiration'], 'overt' => $pollarray['overt'], 'pollpreview' => $polloptionpreview);
C::t('forum_poll')->insert($data);
/*end renxing vote insert*/
$class_tag = new tag();
$tagstr = $class_tag->add_tag($_GET['tags'], $tid, 'tid');
$message = preg_replace('/\\[attachimg\\](\\d+)\\[\\/attachimg\\]/is', '[attach]\\1[/attach]', $message);
$message = $_GET['platType'] == 1 ? $message . "\r\n[url=/mobcent/download/down.php]" . Common::get_unicode_charset('\\u6765\\u81ea\\u5b89\\u5353\\u5ba2\\u6237\\u7aef') . '[/url]' : $message . "\r\n[url=/mobcent/download/down.php]" . Common::get_unicode_charset('\\u6765\\u81ea\\u0069\\u0070\\u0068\\u006f\\u006e\\u0065\\u5ba2\\u6237\\u7aef') . "[/url]";
$pid = insertpost(array('fid' => $_G['fid'], 'tid' => $tid, 'first' => '1', 'author' => $author, 'authorid' => $_G['uid'], 'subject' => $subject, 'dateline' => time(), 'message' => $message, 'useip' => get_client_ip(), 'invisible' => $pinvisible, 'anonymous' => $isAnonymous, 'usesig' => $usesig, 'htmlon' => $htmlon, 'bbcodeoff' => 0, 'smileyoff' => $smileyoff, 'parseurloff' => $parseurloff, 'attachment' => $attachment, 'tags' => $tagstr, 'replycredit' => 0, 'status' => 0));
if ($_G['group']['allowat'] && $atlist) {
foreach ($atlist as $atuid => $atusername) {
mobcent_helper_notification::notification_add($_G['username'], $atuid, 'at', 'at_message', $_G['uid'], array('from_id' => $tid, 'from_idtype' => 'at', 'buyerid' => $_G['uid'], 'buyer' => $_G['username'], 'tid' => $tid, 'subject' => $subject, 'pid' => $pid, 'message' => messagecutstr($message, 150)));
}
set_atlist_cookie(array_keys($atlist));
}
if (empty($aid_Img)) {
$threadimageaid = $aid;
if ($aid) {
$tableid = getattachtableid($tid);
$query = get_forum_attachment_unused($aid);
while ($attach = DB::fetch($query)) {
$aids = $attach['aid'];
$data = $attach;
}
$uid = $_G['uid'];
update_forum_attachment($tid, $tableid, $uid, $pid, $aids);
$data['uid'] = 1;
$data['tid'] = $tid;
$data['pid'] = $pid;
C::t('forum_attachment_n')->insert($tableid, $data);
}
$values = array('fid' => $_G['fid'], 'tid' => $tid, 'pid' => $pid, 'coverimg' => '');
$param = array();
if ($_G['forum']['picstyle']) {
if (!setthreadcover($pid, 0, $threadimageaid)) {
preg_match_all("/(\\[img\\]|\\[img=\\d{1,4}[x|\\,]\\d{1,4}\\])\\s*([^\\[\\<\r\n]+?)\\s*\\[\\/img\\]/is", $message, $imglist, PREG_SET_ORDER);
$values['coverimg'] = "<p id=\"showsetcover\">" . lang('message', 'post_newthread_set_cover') . "<span id=\"setcoverwait\"></span></p><script>if(\$('forward_a')){\$('forward_a').style.display='none';setTimeout(\"\$('forward_a').style.display=''\", 5000);};ajaxget('forum.php?mod=ajax&action=setthreadcover&tid={$tid}&pid={$pid}&fid={$_G['fid']}&imgurl={$imglist[0][2]}&newthread=1', 'showsetcover', 'setcoverwait')</script>";
$param['clean_msgforward'] = 1;
$param['timeout'] = $param['refreshtime'] = 15;
}
}
if ($threadimageaid && empty($imagearr)) {
if (!$threadimage) {
$threadimage = C::t('forum_attachment_n')->fetch('tid:' . $tid, $threadimageaid);
}
$threadimage = daddslashes($threadimage);
C::t('forum_threadimage')->insert(array('tid' => $tid, 'attachment' => $threadimage['attachment'], 'remote' => $threadimage['remote']));
}
} else {
$isInsertForumImage = false;
foreach ($aid_Img as $key => $val) {
$threadimageaid = $val;
if ($val) {
$tableid = getattachtableid($tid);
$query = DB::query("SELECT * FROM %t WHERE aid=%d", array('forum_attachment_unused', $val));
while ($attach = DB::fetch($query)) {
$aids = $attach['aid'];
$data = $attach;
}
DB::query("UPDATE %t SET tid=%d,tableid=%d,uid=%d,pid=%d WHERE aid IN (%n)", array('forum_attachment', $tid, getattachtableid($tid), $_G['uid'], $pid, $aids));
$data['uid'] = 1;
$data['tid'] = $tid;
$data['pid'] = $pid;
C::t('forum_attachment_n')->insert($tableid, $data);
}
$values = array('fid' => $_G['fid'], 'tid' => $tid, 'pid' => $pid, 'coverimg' => '');
$param = array();
示例9: before_editpost
public function before_editpost($parameters)
{
global $_G;
$isfirstpost = $this->post['first'] ? 1 : 0;
$attachupdate = !empty($_GET['delattachop']) || ($this->group['allowpostattach'] || $this->group['allowpostimage']) && ($_GET['attachnew'] || $parameters['special'] == 2 && $_GET['tradeaid'] || $parameters['special'] == 4 && $_GET['activityaid'] || $isfirstpost && $parameters['sortid']);
if ($attachupdate) {
updateattach($this->thread['displayorder'] == -4 || $_G['forum_auditstatuson'], $this->thread['tid'], $this->post['pid'], $_GET['attachnew'], $_GET['attachupdate'], $this->post['authorid']);
}
if ($isfirstpost && $attachupdate) {
if (!$this->param['threadimageaid']) {
$this->param['threadimage'] = C::t('forum_attachment_n')->fetch_max_image('tid:' . $this->thread['tid'], 'pid', $this->post['pid']);
$this->param['threadimageaid'] = $this->param['threadimage']['aid'];
}
if ($this->forum['picstyle']) {
if (empty($this->thread['cover'])) {
setthreadcover($this->post['pid'], 0, $this->param['threadimageaid']);
} else {
setthreadcover($this->post['pid'], $this->thread['tid'], 0, 1);
}
}
if ($this->param['threadimageaid']) {
if (!$this->param['threadimage']) {
$this->param['threadimage'] = C::t('forum_attachment_n')->fetch_max_image('tid:' . $this->thread['tid'], 'tid', $this->thread['tid']);
}
C::t('forum_threadimage')->delete_by_tid($this->thread['tid']);
C::t('forum_threadimage')->insert(array('tid' => $this->thread['tid'], 'attachment' => $this->param['threadimage']['attachment'], 'remote' => $this->param['threadimage']['remote']));
}
}
}
示例10: forum_article_content
function forum_article_content($arr)
{
global $_G;
require_once libfile('function/editor');
require_once libfile('function/home');
$setarr['attachment'] = $arr['attachment'];
$setarr['message'] = html2bbcode(media_htmlbbcode(dstripslashes(clear_ad_html($arr['message']))));
$setarr['message'] = htmlspecialchars_decode($setarr['message']);
if (DISCUZ_VERSION != 'X2') {
//2.5版本
$setarr = dstripslashes($setarr);
} else {
$setarr = daddslashes($setarr);
}
DB::update('forum_post', $setarr, array('pid' => $arr['pid']));
if (!$arr['is_post'] || $arr['is_post'] > 0 && $arr['attachment'] > 0) {
DB::update('forum_thread', array('attachment' => $arr['attachment']), array('tid' => $arr['tid']));
}
if (!$arr['is_post'] || $arr['is_post'] > 0 && $arr['attachment'] > 0) {
DB::update('forum_thread', array('attachment' => $arr['attachment']), array('tid' => $arr['tid']));
//图片列表模式的帖子设置封面
$forumpicstyle = DB::result_first("SELECT picstyle FROM " . DB::table('forum_forumfield') . " WHERE fid='{$arr['forum_fid']}'");
if ($forumpicstyle) {
if ($_G['setting']['forumpicstyle']) {
$_G['setting']['forumpicstyle'] = dunserialize($_G['setting']['forumpicstyle']);
empty($_G['setting']['forumpicstyle']['thumbwidth']) && ($_G['setting']['forumpicstyle']['thumbwidth'] = 214);
empty($_G['setting']['forumpicstyle']['thumbheight']) && ($_G['setting']['forumpicstyle']['thumbheight'] = 160);
} else {
$_G['setting']['forumpicstyle'] = array('thumbwidth' => 214, 'thumbheight' => 160);
}
setthreadcover($arr['pid']);
}
}
}