function afterpost() { global $db_ifpwcache, $timestamp; if ($this->data['ifcheck'] == 1) { if ($this->forum->foruminfo['allowhtm'] && !$this->forum->foruminfo['cms']) { $StaticPage = L::loadClass('StaticPage'); $StaticPage->update($this->tid); } $lastpost = array('subject' => substrs($this->data['title'], 26), 'author' => $this->data['lastposter'], 'lastpost' => $timestamp, 'tid' => $this->tid, 't_date' => $timestamp); $this->forum->lastinfo('topic', '+', $lastpost); if ($this->forum->isOpen() && !$this->data['anonymous']) { require_once R_P . 'require/functions.php'; if (!$this->extraBehavior) { $weiboService = L::loadClass('weibo', 'sns'); /* @var $weiboService PW_Weibo */ $weiboContent = substrs(stripWindCode($weiboService->escapeStr(strip_tags($this->data['content']))), 125); $weiboExtra = array('title' => stripslashes($this->data['title']), 'fid' => $this->forum->fid, 'fname' => $this->forum->name, 'atusers' => $this->data['atusers']); $weiboService->send($this->post->uid, $weiboContent, 'article', $this->tid, $weiboExtra); $threadService = L::loadClass('threads', 'forum'); $threadService->setAtUsers($this->tid, 0, $this->data['atusers']); } //会员资讯缓存 $userCache = L::loadClass('Usercache', 'user'); $userCache->delete($this->data['authorid'], array('article', 'cardtopic')); /* $usercachedata = array(); $usercachedata['subject'] = substrs(stripWindCode($this->data['title']), 100, N); $usercachedata['content'] = substrs(stripWindCode($this->data['content']), 100, N); $usercachedata['postdate'] = $timestamp; if ($this->att) { $usercachedata['attimages'] = $this->att->getImages(4); } $userCache->update($this->data['authorid'], 'topic', $this->tid, $usercachedata); */ } //Start elementupdate require_once D_P . 'data/bbscache/o_config.php'; if ($db_ifpwcache & 128 || $o_browseopen || $db_ifpwcache & 512 && $this->att && $this->att->elementpic) { L::loadClass('elementupdate', '', false); $elementupdate = new ElementUpdate($this->forum->fid); if ($db_ifpwcache & 128) { $elementupdate->newSubjectUpdate($this->tid, $this->forum->fid, $timestamp, $this->data['special']); } if ($db_ifpwcache & 512 && $this->att && $this->att->elementpic && $this->_checkIfHidden()) { $elementupdate->newPicUpdate($this->att->elementpic['aid'], $this->forum->fid, $this->tid, $this->att->elementpic['attachurl'], $this->att->elementpic['ifthumb'], $this->data['content']); } if ($o_browseopen) { $elementupdate->setCacheNum(100); /*设置缓存100个*/ $elementupdate->lastPostUpdate($this->data['authorid'], $this->tid, $timestamp); } $elementupdate->updateSQL(); } require_once R_P . 'require/functions.php'; updateDatanalyse($this->data['authorid'], 'memberThread', 1); //End elementupdate } if ($this->postdata->filter->filter_weight > 1) { $this->postdata->filter->insert($this->tid, 0, implode(',', $this->postdata->filter->filter_word), $this->postdata->filter->filter_weight); } if ($this->data['topped'] > 0) { require_once R_P . 'require/updateforum.php'; setForumsTopped($this->tid, $this->data['fid'], $this->data['topped']); updatetop(); } }