diff --git a/upload/install/include/install_function.php b/upload/install/include/install_function.php index e2b7300..bc68528 100644 --- a/upload/install/include/install_function.php +++ b/upload/install/include/install_function.php @@ -4,7 +4,7 @@ * [Discuz!] (C)2001-2099 Comsenz Inc. * This is NOT a freeware, use is subject to license terms * - * $Id: install_function.php 36313 2016-12-19 07:06:44Z nemohou $ + * $Id: install_function.php 36324 2016-12-22 01:01:16Z nemohou $ */ if(!defined('IN_COMSENZ')) { diff --git a/upload/install/include/install_var.php b/upload/install/include/install_var.php index 14ebcce..bdae01b 100644 --- a/upload/install/include/install_var.php +++ b/upload/install/include/install_var.php @@ -4,7 +4,7 @@ * [Discuz!] (C)2001-2099 Comsenz Inc. * This is NOT a freeware, use is subject to license terms * - * $Id: install_var.php 36311 2016-12-19 01:47:34Z nemohou $ + * $Id: install_var.php 36324 2016-12-22 01:01:16Z nemohou $ */ if(!defined('IN_COMSENZ')) { diff --git a/upload/source/admincp/discuzfiles.md5 b/upload/source/admincp/discuzfiles.md5 index 55cf7ea..ff8e00b 100644 --- a/upload/source/admincp/discuzfiles.md5 +++ b/upload/source/admincp/discuzfiles.md5 @@ -789,7 +789,7 @@ ea0804418f05dc8372abb669d3b4c67e *source/function/function_blog.php 1f719213dcd973d4fc1ba9c32e53383e *source/function/function_cloudaddons.php 77f06f33b827d1155c5c3c2f28bc7909 *source/function/function_collection.php 90ee4789682564336c6043e19dc2dcb8 *source/function/function_comment.php -c0f18f403dce9a8fbc001761bd600489 *source/function/function_core.php +3db07b798e015607661ad9de1d74f165 *source/function/function_core.php 9bc78bc4596f7711cd5d338a791bc9be *source/function/function_credit.php dc26872be5adc5364f42bc0335c4b504 *source/function/function_delete.php 160406afb012cbe8f93ce949a8bcb4bf *source/function/function_discuzcode.php @@ -1206,7 +1206,7 @@ c4cc92f6de3bddcbe452039bba167d4f *source/module/misc/misc_diyhelp.php aed09ee91f0152cf394e8fe7eb83d007 *source/module/misc/misc_faq.php 0c2a7a825561f1cbb9d74112086bc430 *source/module/misc/misc_getatuser.php 670249a9c4264680aeaef53d39d9da8e *source/module/misc/misc_imgcropper.php -0131e5eb18245cf4191f92b940a0ea45 *source/module/misc/misc_initsys.php +9a85bd4b036ae0fd179429e7523e1fc2 *source/module/misc/misc_initsys.php c41c71f883fd0e79e84bd620edc6e747 *source/module/misc/misc_invite.php 9f78eea5aef9b4d27aa5159edba88316 *source/module/misc/misc_manyou.php 6fba6243a1f3df7466accb774e11230c *source/module/misc/misc_mobile.php diff --git a/upload/source/function/function_core.php b/upload/source/function/function_core.php index 81bdbe0..c71d6b7 100644 --- a/upload/source/function/function_core.php +++ b/upload/source/function/function_core.php @@ -4,7 +4,7 @@ * [Discuz!] (C)2001-2099 Comsenz Inc. * This is NOT a freeware, use is subject to license terms * - * $Id: function_core.php 36293 2016-12-14 02:50:56Z nemohou $ + * $Id: function_core.php 36324 2016-12-22 01:01:16Z nemohou $ */ if(!defined('IN_DISCUZ')) { diff --git a/upload/source/module/misc/misc_initsys.php b/upload/source/module/misc/misc_initsys.php index fc14950..f73a4c4 100644 --- a/upload/source/module/misc/misc_initsys.php +++ b/upload/source/module/misc/misc_initsys.php @@ -4,7 +4,7 @@ * [Discuz!] (C)2001-2099 Comsenz Inc. * This is NOT a freeware, use is subject to license terms * - * $Id: misc_initsys.php 35993 2016-06-30 03:10:50Z nemohou $ + * $Id: misc_initsys.php 36323 2016-12-20 09:49:00Z nemohou $ */ if(!defined('IN_DISCUZ')) { @@ -29,7 +29,7 @@ if($_G['config']['output']['tplrefresh']) { cleartemplatecache(); } -$plugins = array('qqconnect', 'cloudstat', 'soso_smilies', 'cloudsearch', 'security', 'xf_storage', 'mobile', 'pcmgr_url_safeguard', 'manyou', 'cloudunion', 'cloudcaptcha', 'wechat'); +$plugins = array('qqconnect', 'cloudstat', 'soso_smilies', 'security', 'mobile', 'pcmgr_url_safeguard', 'manyou', 'cloudcaptcha', 'wechat'); $opens = array('mobile', 'pcmgr_url_safeguard', 'security', 'cloudcaptcha'); $checkcloses = array('cloudcaptcha'); diff --git a/upload/source/plugin/cloudsearch/admincp.inc.php b/upload/source/plugin/cloudsearch/admincp.inc.php deleted file mode 100644 index cec2734..0000000 --- a/upload/source/plugin/cloudsearch/admincp.inc.php +++ /dev/null @@ -1,16 +0,0 @@ - \ No newline at end of file diff --git a/upload/source/plugin/cloudsearch/cloudsearch.inc.php b/upload/source/plugin/cloudsearch/cloudsearch.inc.php deleted file mode 100644 index 756b467..0000000 --- a/upload/source/plugin/cloudsearch/cloudsearch.inc.php +++ /dev/null @@ -1,133 +0,0 @@ -fetch_all_forum_by_formula_for_plugin() as $forum) { - if (check_formula_forum_isforbidden($forum['formulaperm'])) { - $forbiddenFids[] = $forum['fid']; - } -} -dsetcookie('ffids' . $_G['uid'], authcode(implode('D', $forbiddenFids), 'ENCODE'), 86400); - - -function check_formula_forum_isforbidden($formula) { - global $_G; - - $formula = dunserialize($formula); - $medalperm = $formula['medal']; - $permusers = $formula['users']; - $permmessage = $formula['message']; - - $formulatext = $formula[0]; - $formula = $formula[1]; - if($_G['adminid'] == 1 || $_G['forum']['ismoderator'] || in_array($_G['groupid'], explode("\t", $_G['forum']['spviewperm']))) { - return FALSE; - } - if($permusers) { - $permusers = str_replace(array("\r\n", "\r"), array("\n", "\n"), $permusers); - $permusers = explode("\n", trim($permusers)); - if(!in_array($_G['member']['username'], $permusers)) { - return TRUE; - } - } - if(!$formula) { - return FALSE; - } - if(strexists($formula, '$memberformula[')) { - preg_match_all("/\\\$memberformula\['(\w+?)'\]/", $formula, $a); - $profilefields = array(); - foreach($a[1] as $field) { - switch($field) { - case 'regdate': - $formula = preg_replace("/\{(\d{4})\-(\d{1,2})\-(\d{1,2})\}/e", "'\'\\1-'.sprintf('%02d', '\\2').'-'.sprintf('%02d', '\\3').'\''", $formula); - case 'regday': - break; - case 'regip': - case 'lastip': - $formula = preg_replace("/\{([\d\.]+?)\}/", "'\\1'", $formula); - $formula = preg_replace('/(\$memberformula\[\'(regip|lastip)\'\])\s*=+\s*\'([\d\.]+?)\'/', "strpos(\\1, '\\3')===0", $formula); - case 'buyercredit': - case 'sellercredit': - space_merge($_G['member'], 'status');break; - case substr($field, 0, 5) == 'field': - space_merge($_G['member'], 'profile'); - $profilefields[] = $field;break; - } - } - $memberformula = array(); - if($_G['uid']) { - $memberformula = $_G['member']; - if(in_array('regday', $a[1])) { - $memberformula['regday'] = intval((TIMESTAMP - $memberformula['regdate']) / 86400); - } - if(in_array('regdate', $a[1])) { - $memberformula['regdate'] = date('Y-m-d', $memberformula['regdate']); - } - $memberformula['lastip'] = $memberformula['lastip'] ? $memberformula['lastip'] : $_G['clientip']; - } else { - if(isset($memberformula['regip'])) { - $memberformula['regip'] = $_G['clientip']; - } - if(isset($memberformula['lastip'])) { - $memberformula['lastip'] = $_G['clientip']; - } - } - } - @eval("\$formulaperm = ($formula) ? TRUE : FALSE;"); - if(!$formulaperm) { - if(!$permmessage) { - $language = lang('forum/misc'); - $search = array('regdate', 'regday', 'regip', 'lastip', 'buyercredit', 'sellercredit', 'digestposts', 'posts', 'threads', 'oltime'); - $replace = array($language['formulaperm_regdate'], $language['formulaperm_regday'], $language['formulaperm_regip'], $language['formulaperm_lastip'], $language['formulaperm_buyercredit'], $language['formulaperm_sellercredit'], $language['formulaperm_digestposts'], $language['formulaperm_posts'], $language['formulaperm_threads'], $language['formulaperm_oltime']); - for($i = 1; $i <= 8; $i++) { - $search[] = 'extcredits'.$i; - $replace[] = $_G['setting']['extcredits'][$i]['title'] ? $_G['setting']['extcredits'][$i]['title'] : $language['formulaperm_extcredits'].$i; - } - if($profilefields) { - loadcache(array('fields_required', 'fields_optional')); - foreach($profilefields as $profilefield) { - $search[] = $profilefield; - $replace[] = !empty($_G['cache']['fields_optional']['field_'.$profilefield]) ? $_G['cache']['fields_optional']['field_'.$profilefield]['title'] : $_G['cache']['fields_required']['field_'.$profilefield]['title']; - } - } - $i = 0;$_G['forum_usermsg'] = ''; - foreach($search as $s) { - if(in_array($s, array('digestposts', 'posts', 'threads', 'oltime', 'extcredits1', 'extcredits2', 'extcredits3', 'extcredits4', 'extcredits5', 'extcredits6', 'extcredits7', 'extcredits8'))) { - $_G['forum_usermsg'] .= strexists($formulatext, $s) ? '
   '.$replace[$i].': '.(@eval('return intval(getuserprofile(\''.$s.'\'));')) : ''; - } elseif(in_array($s, array('regdate', 'regip', 'regday'))) { - $_G['forum_usermsg'] .= strexists($formulatext, $s) ? '
   '.$replace[$i].': '.(@eval('return $memberformula[\''.$s.'\'];')) : ''; - } - $i++; - } - $search = array_merge($search, array('and', 'or', '>=', '<=', '==')); - $replace = array_merge($replace, array('  '.$language['formulaperm_and'].'  ', '  '.$language['formulaperm_or'].'  ', '≥', '≤', '=')); - $_G['forum_formulamessage'] = str_replace($search, $replace, $formulatext); - } else { - $_G['forum_formulamessage'] = $permmessage; - } - return TRUE; - } - return FALSE; -} \ No newline at end of file diff --git a/upload/source/plugin/cloudsearch/discuz_plugin_cloudsearch.xml b/upload/source/plugin/cloudsearch/discuz_plugin_cloudsearch.xml deleted file mode 100644 index 9b667b1..0000000 --- a/upload/source/plugin/cloudsearch/discuz_plugin_cloudsearch.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/upload/source/plugin/cloudsearch/forumdisplay.inc.php b/upload/source/plugin/cloudsearch/forumdisplay.inc.php deleted file mode 100644 index 98c44ab..0000000 --- a/upload/source/plugin/cloudsearch/forumdisplay.inc.php +++ /dev/null @@ -1,83 +0,0 @@ - $threaddiv, 'page'=> $multipage), array('closetime' => '2', 'showmsg' => '1')); - -} elseif($_GET['cloudop'] == 'relatelist') { - - list($threadlist, $cloudData) = getCloudRelateThreads(($_GET['fid'] ? 'forum' : 'tao'), $_GET['keyword'], $_G['page'], ($_GET['fid'] ? $_G['tpp'] : 5), ($_GET['fid'] ? $_GET['fid'] : ''), false); - - if ($_GET['fid']) { - loadcache('forums'); - } - - $searchHelper = Cloud::loadClass('Service_SearchHelper'); - $searchparams = $searchHelper->makeSearchSignUrl(); - $srchotquery = ''; - if(!empty($searchparams['params'])) { - foreach($searchparams['params'] as $key => $value) { - $srchotquery .= '&' . $key . '=' . $value; - } - } - - include template('common/header'); - echo tpl_cloudsearch_relate_threadlist_js_output($threadlist, $_GET['fid'] ? urlencode(strip_tags($_G['cache']['forums'][$_GET['fid']]['name'])) : urlencode(strip_tags($_GET['keyword'])), $searchparams, $srchotquery); - include template('common/footer'); -} - -dexit(); - -function getCloudRelateThreads($api = 'tao', $keyword, $page, $tpp = 20, $excludeForumIds = '', $cache = false) { - global $_G; - - $threadlist = array(); - $searchHelper = Cloud::loadClass('Service_SearchHelper'); - if($api != 'tao') { - $cloudData = $searchHelper->getRelatedThreads($excludeForumIds); - } else { - $cloudData = $searchHelper->getRelatedThreadsTao($keyword, $page, $tpp, $disAd, $of, $ot, $cache, $excludeForumIds); - } - if($cloudData['result']['data']) { - foreach ($cloudData['result']['ad']['content'] as $sAdv) { - $threadlist[] = array('icon' => (string)$cloudData['result']['ad']['icon']) + $sAdv; - } - foreach ($cloudData['result']['data'] as $sPost) { - $threadlist[] = $sPost; - } - } else { - return null; - } - loadcache('forums'); - - foreach($threadlist as $curtid=>&$curvalue) { - $curvalue['pForumName'] = $_G['cache']['forums'][$curvalue['pForumId']]['name']; - $curvalue['istoday'] = strtotime($curvalue['pPosted']) > $todaytime ? 1 : 0; - $curvalue['dateline'] = $curvalue['pPosted']; - } - - return array($threadlist, $cloudData); -} -?> \ No newline at end of file diff --git a/upload/source/plugin/cloudsearch/index.htm b/upload/source/plugin/cloudsearch/index.htm deleted file mode 100644 index e69de29..0000000 diff --git a/upload/source/plugin/cloudsearch/install.php b/upload/source/plugin/cloudsearch/install.php deleted file mode 100644 index 4a3653f..0000000 --- a/upload/source/plugin/cloudsearch/install.php +++ /dev/null @@ -1,39 +0,0 @@ - 0, - 'allow_hot_topic' => 1, - 'allow_thread_related' => 1, - 'allow_recommend_related' => 1, - 'allow_thread_related_bottom' => 0, - 'allow_forum_recommend' => 1, - 'allow_forum_related' => 0, - 'allow_collection_related' => 1, - 'allow_search_suggest' => 0, - 'cp_version' => 1, - 'recwords_lifetime' => 21600, -); - -if (is_array($_G['setting']['my_search_data'])) { - $my_search_data = array_merge($my_search_data, $_G['setting']['my_search_data']); -} - -$insertData = serialize($my_search_data); - -$sql = <<allow = $cloudAppService->getCloudAppStatus('search'); - if($this->allow) { - $this->allow_hot_topic = $_G['setting']['my_search_data']['allow_hot_topic']; - $this->allow_thread_related = isset($_G['setting']['my_search_data']['allow_thread_related']) ? $_G['setting']['my_search_data']['allow_thread_related'] : 1; - $this->allow_recommend_related = isset($_G['setting']['my_search_data']['allow_recommend_related']) ? $_G['setting']['my_search_data']['allow_recommend_related'] : 1; - $this->allow_forum_recommend = $_G['setting']['my_search_data']['allow_forum_recommend']; - $this->allow_forum_related = $_G['setting']['my_search_data']['allow_forum_related']; - $this->allow_collection_related = $_G['setting']['my_search_data']['allow_collection_related']; - $this->allow_search_suggest = $_G['setting']['my_search_data']['allow_search_suggest']; - $this->allow_thread_related_bottom = $_G['setting']['my_search_data']['allow_thread_related_bottom']; - include_once template('cloudsearch:module'); - - if (!$searchparams) { - $searchHelper = Cloud::loadClass('Cloud_Service_SearchHelper'); - $searchparams = $searchHelper->makeSearchSignUrl(); - } - } - } - - public function common() { - if(!$this->allow) { - return; - } - - if ($_GET['mod'] == 'redirect' && $_GET['goto'] == 'findpost' && $_GET['ptid'] && $_GET['pid']) { - $post = get_post_by_pid($_GET['pid']); - if (empty($post)) { - $searchHelper = Cloud::loadClass('Cloud_Service_SearchHelper'); - $searchHelper->myPostLog('redelete', array('pid' => $_GET['pid'])); - } - } - } - - public function global_footer() { - if(!$this->allow) { - return; - } - - $res = ''; - if(($this->allow_thread_related && $GLOBALS['page'] == 1 || $this->allow_thread_related_bottom) && CURSCRIPT == 'forum' && CURMODULE == 'viewthread') { - $res = tpl_cloudsearch_global_footer_related(); - } - - if($this->allow_recommend_related && CURSCRIPT == 'forum' && (CURMODULE == 'viewthread' || CURMODULE == 'forumdisplay')) { - if($this->_is_from_search_engine()) { - $res .= tpl_cloudsearch_global_footer_mini(); - } - } - - if ($this->allow_search_suggest) { - $params = array( - 'callback' => 'cloudsearch_suggest_callback' - ); - $util = Cloud::loadClass('Cloud_Service_Util'); - $queryString = $util->generateSiteSignUrl($params, true); - $res .= tpl_cloudsearch_global_footer_suggest($queryString); - } - $res .= tpl_cloudsearch_global_footer_formula_output(); - - return $res; - } - - private function _is_from_search_engine() { - - $regex = "((http|https)\:\/\/)?"; - $regex .= "([a-z]*.)+?(ask.com|yahoo.com|bing.com|baidu.com|soso.com|google.com|google.cn|gougou.com|sogou.com|yahoo.cn|youdao.com|google.com.hk|360.cn|360sou.com|so.com)(.[a-z]{2,3})?\/"; - if(preg_match("/^$regex/i", $_SERVER['HTTP_REFERER'])) { - return true; - } - - return false; - } - - public function topicadmin_message($params) { - if(!$this->allow || !$params) { - return; - } - - $param = $params['param']; - if($param[0] == 'admin_succeed') { - $searchHelper = Cloud::loadClass('Cloud_Service_SearchHelper'); - $action = $_GET['action']; - - switch($action) { - case 'moderate': - global $operations; - $moderate = empty($_GET['moderate']) ? array() : $_GET['moderate']; - - foreach($moderate as $tid) { - if(!$tid = max(0, intval($tid))) { - continue; - } - - foreach($operations as $operation) { - if(in_array($operation, array('stick', 'highlight', 'digest', 'bump', 'down', 'delete', 'move', 'close', 'open'))) { - - if($operation == 'stick') { - $my_opt = $_GET['sticklevel'] ? 'sticky' : 'update'; - } elseif($operation == 'digest') { - $my_opt = $_GET['digestlevel'] ? 'digest' : 'update'; - } elseif($operation == 'highlight') { - $my_opt = $_GET['highlight_color'] ? 'highlight' : 'update'; - } else { - $my_opt = $operation; - } - - $data = array('tid' => $tid); - if($my_opt == 'move' && $_GET['moveto']) { - global $toforum; - $data['otherid'] = $toforum['fid']; - } - - $searchHelper->myThreadLog($my_opt, $data); - } - } - } - break; - - case 'banpost': - global $posts; - - $banned = intval($_GET['banned']); - foreach($posts as $post) { - if ($banned) { - $searchHelper->myPostLog('ban', array('pid' => $post['pid'], 'uid' => $post['authorid'])); - } else { - $searchHelper->myPostLog('unban', array('pid' => $post['pid'], 'uid' => $post['authorid'])); - } - } - break; - - case 'merge': - global $_G, $thread; - $othertid = intval($_GET['othertid']); - - if ($thread) { - $searchHelper->myThreadLog('merge', array('tid' => $othertid, 'otherid' => $_G['tid'], 'fid' => $thread['fid'])); - } - break; - - case 'split': - global $_G, $pids; - - $searchHelper->myThreadLog('split', array('tid' => $_G['tid'])); - - foreach((array)explode(',', $pids) as $pid) { - $searchHelper->myPostLog('split', array('pid' => $pid)); - } - break; - - case 'warn': - global $warned, $posts; - - foreach((array)$posts as $k => $post) { - if($warned && !($post['status'] & 2)) { - $searchHelper->myPostLog('warn', array('pid' => $post['pid'], 'uid' => $post['authorid'])); - } elseif(!$warned && ($post['status'] & 2)) { - $searchHelper->myPostLog('unwarn', array('pid' => $post['pid'], 'uid' => $post['authorid'])); - } - } - break; - - default: - break; - } - } - } - - public function modcp_message($params) { - if(!$this->allow || !$params) { - return; - } - - $param = $params['param']; - if(in_array($param[0], array('modcp_member_ban_succeed', 'modcp_mod_succeed', 'modcp_recyclebin_restore_succeed', 'modcp_recyclebin_delete_succeed'))) { - $searchHelper = Cloud::loadClass('Cloud_Service_SearchHelper'); - $action = $_GET['action']; - - switch($action) { - case 'member': - global $groupidnew, $member; - - $my_opt = in_array($groupidnew, array(4, 5)) ? 'banuser' : 'unbanuser'; - $searchHelper->myThreadLog($my_opt, array('uid' => $member['uid'])); - break; - - case 'moderate': - global $op, $postlist; - - if($op == 'replies') { - global $postlist; - - foreach((array)$postlist as $post) { - $searchHelper->myPostLog('validate', array('pid' => $post['pid'])); - } - } else { - global $moderation; - - foreach((array)$moderation['validate'] as $tid) { - $searchHelper->myThreadLog('validate', array('tid' => $tid)); - } - } - break; - - case 'recyclebin': - if(!empty($_GET['moderate'])) { - global $_G; - - foreach(C::t('forum_thread')->fetch_all_by_tid_displayorder($_GET['moderate'], -1, '=', $_G['fid']) as $tid) { - if($op == 'restore') { - $searchHelper->myThreadLog('restore', array('tid' => $tid['tid'])); - } elseif($op == 'delete' && $_G['group']['allowclearrecycle']) { - $searchHelper->myPostLog('delete', array('tid' => $tid['tid'])); - } - } - } - break; - - default: - break; - } - } - } - - public function viewthread_message($params) { - if(!$this->allow || !$params) { - return; - } - - $param = $params['param']; - if ($param[0] == 'thread_nonexistence' && $_GET['tid']) { - $searchHelper = Cloud::loadClass('Cloud_Service_SearchHelper'); - $searchHelper->myThreadLog('redelete', array('tid' => $_GET['tid'])); - } - } - - public function space_message($params) { - if(!$this->allow || !$params) { - return; - } - - $param = $params['param']; - if ($param[0] == 'thread_delete_succeed') { - global $moderate; - - $searchHelper = Cloud::loadClass('Cloud_Service_SearchHelper'); - foreach((array)$moderate as $tid) { - $searchHelper->myThreadLog('delete', array('tid' => $tid)); - } - } - } - - public function post_message($params) { - if(!$this->allow || !$params) { - return; - } - - global $_G, $isfirstpost, $pid, $modnewthreads, $pinvisible; - $param = $params['param']; - $searchHelper = Cloud::loadClass('Cloud_Service_SearchHelper'); - if($param[0] == 'post_edit_delete_succeed' && !empty($_GET['delete']) && $isfirstpost) { - $searchHelper->myThreadLog('delete', array('tid' => $_G['tid'])); - } elseif($param[0] == 'post_edit_delete_succeed' && !empty($_GET['delete'])) { - $searchHelper->myPostLog('delete', array('pid' => $pid)); - } elseif($param[0] == 'post_edit_succeed' && !$modnewreplies && $pinvisible != -3) { - $searchHelper->myPostLog('update', array('pid' => $pid)); - } - } - - public function deletemember($params) { - $uids = $params['param'][0]; - $step = $params['step']; - - if($step == 'delete' && is_array($uids)) { - $searchHelper = Cloud::loadClass('Cloud_Service_SearchHelper'); - foreach($uids as $uid) { - $searchHelper->myThreadLog('deluser', array('uid' => $uid)); - } - } - } - - public function deletepost($params) { - $pids = $params['param'][0]; - $idtype = $params['param'][1]; - $step = $params['step']; - - if($step == 'delete' && $idtype == 'pid' && is_array($pids)) { - $searchHelper = Cloud::loadClass('Cloud_Service_SearchHelper'); - foreach($pids as $pid) { - $searchHelper->myPostLog('delete', array('pid' => $pid)); - } - } - } - - public function deletethread($params) { - $tids = $params['param'][0]; - $step = $params['step']; - - if($step == 'delete' && is_array($tids)) { - $searchHelper = Cloud::loadClass('Cloud_Service_SearchHelper'); - foreach($tids as $tid) { - $searchHelper->myThreadLog('delete', array('tid' => $tid)); - } - } - } - - public function undeletethreads($params) { - $tids = $params['param'][0]; - - if(is_array($tids)) { - $searchHelper = Cloud::loadClass('Cloud_Service_SearchHelper'); - foreach($tids as $tid) { - $searchHelper->myThreadLog('restore', array('tid' => $tid)); - } - } - } - - public function recyclebinpostundelete($params) { - $pids = $params['param'][0]; - - if(is_array($pids)) { - $searchHelper = Cloud::loadClass('Cloud_Service_SearchHelper'); - foreach($pids as $pid) { - $searchHelper->myPostLog('restore', array('pid' => $pid)); - } - } - } - - public function threadpubsave($params) { - global $thread; - $step = $params['step']; - $posts = $params['posts']; - - if($step == 'save') { - $searchHelper = Cloud::loadClass('Cloud_Service_SearchHelper'); - if ($thread['tid']) { - $searchHelper->myThreadLog('update', array('tid' => $thread['tid'])); - } - - if($thread['replies'] && is_array($posts)) { - foreach($posts as $post) { - $searchHelper->myPostLog('update', array('pid' => $post['pid'])); - } - } - } - } -} - -class plugin_cloudsearch_member extends plugin_cloudsearch { - -} - -class plugin_cloudsearch_forum extends plugin_cloudsearch { - - public function index_catlist_top_output() { - if(!$this->allow || !$this->allow_hot_topic) { - return; - } - - global $searchparams; - - $searchHelper = Cloud::loadClass('Service_SearchHelper'); - $recwords = $searchHelper->getRecWords(14, 'assoc'); - $srchotquery = ''; - if(!empty($searchparams['params'])) { - foreach($searchparams['params'] as $key => $value) { - $srchotquery .= '&' . $key . '=' . rawurlencode($value); - } - } - return tpl_cloudsearch_index_top($recwords, $searchparams, $srchotquery); - } - - public function viewthread_postbottom_output() { - if(!$this->allow_thread_related) { - return; - } - global $_G; - $return = array(); - if($GLOBALS['page'] == 1 && $_G['forum_firstpid'] && $GLOBALS['postlist'][$_G['forum_firstpid']]['invisible'] == 0) { - $return[] = tpl_cloudsearch_viewthread_postbottom_output(); - return $return; - } - } - - public function collection_viewoptions_output() { - if(!$this->allow) { - return; - } - global $_G; - - if($GLOBALS['permission'] || $GLOBALS['isteamworkers']) { - return tpl_cloudsearch_collection_viewoptions_output(); - } - } - - public function collection_relatedop_output() { - if(!$this->allow || $GLOBALS['op'] != 'related') { - return; - } - global $_G; - - if(!$GLOBALS['permission'] && !$GLOBALS['isteamworkers']) { - showmessage('undefined_action', NULL); - } - $_GET['keyword'] = trim($_GET['keyword']); - $gKeyword = $_GET['keyword'] ? $_GET['keyword'] : $_G['collection']['name']; - - $tids = array(); - - $searchHelper = Cloud::loadClass('Service_SearchHelper'); - $cloudData = $searchHelper->getRelatedThreadsTao($gKeyword, $_G['page'], $_G['tpp']); - - if($cloudData['result']['data']) { - foreach ($cloudData['result']['ad']['content'] as $sAdv) { - $threadlist[] = array('icon' => (string)$cloudData['result']['ad']['icon']) + $sAdv; - } - foreach ($cloudData['result']['data'] as $sPost) { - $threadlist[] = $sPost; - } - - loadcache('forums'); - foreach($threadlist as $curtid=>&$curvalue) { - $curvalue['pForumName'] = $_G['cache']['forums'][$curvalue['pForumId']]['name']; - $curvalue['istoday'] = strtotime($curvalue['pPosted']) > $todaytime ? 1 : 0; - $curvalue['dateline'] = $curvalue['pPosted']; - } - $multipage = multi($cloudData['result']['total'], $_G['tpp'], $_G['page'], "forum.php?mod=collection&action=view&op=related&ctid={$_G['collection']['ctid']}&keyword=".urlencode($_GET['keyword'])); - } - return tpl_cloudsearch_collection_relatedop_output($threadlist, $multipage); - } - - public function collection_threadlistbottom_output() { - if(!$this->allow_collection_related || !$GLOBALS['ctid'] || $GLOBALS['action'] != 'view' || $GLOBALS['op']) { - return; - } - global $_G; - - return tpl_cloudsearch_relate_threadlist_output(urlencode($_G['collection']['name'].' '.implode(' ', $_G['collection']['arraykeyword']))); - } - - public function forumdisplay_threadlist_bottom_output() { - global $_G; - - if(!$this->allow_forum_related|| $_G['page'] > 1) { - return; - } - - return tpl_cloudsearch_relate_threadlist_output(urlencode($_G['forum']['name'])); - } - - public function forumdisplay_middle_output() { - if(!$this->allow || !$this->allow_forum_recommend) { - return; - } - - global $_G, $searchparams; - $result = ''; - if ($_G['fid']) { - $searchHelper = Cloud::loadClass('Service_SearchHelper'); - $recwords = $searchHelper->getRecWords(14, 'assoc', $_G['fid']); - $srchotquery = ''; - if(!empty($searchparams['params'])) { - foreach($searchparams['params'] as $key => $value) { - $srchotquery .= '&' . $key . '=' . rawurlencode($value); - } - } - $result = tpl_cloudsearch_index_top($recwords, $searchparams, $srchotquery, 'hotopic_fm'); - } - - return $result; - } - - public function viewthread_middle_output() { - - if (!$this->allow || !$this->allow_thread_related_bottom) { - return; - } - - global $_G; - if ($_G['page'] == 1) { - return; - } - - return tpl_cloudsearch_viewthread_modaction_output(); - } - - public function index_forum_extra_output() { - - return array(); - } - - public function forumdisplay_subforum_extra_output() { - - return array(); - } - - private function _get_forum_hotspot($forumlist) { - if (!$this->allow || !$this->allow_forum_recommend) { - return; - } - - global $_G, $searchparams; - - if (!is_array($forumlist) || count($forumlist) == 0 || !$searchparams) { - return; - } - - $srchotquery = ''; - if(!empty($searchparams['params'])) { - foreach($searchparams['params'] as $key => $value) { - $srchotquery .= '&' . $key . '=' . rawurlencode($value); - } - } - - $return = $cachenames = $fids = array(); - foreach ($forumlist as $fid => $forum) { - $cachenames[] = 'search_recommend_words_' . $forum['fid']; - $fids[] = $forum['fid']; - } - - loadcache($cachenames); - foreach ($fids as $v) { - $forum_recwords = $_G['cache']['search_recommend_words_' . $v]['result']; - if (!$forum_recwords) { - continue; - } - - $forum_recwords = array_slice($forum_recwords, 0, 3); - - foreach($forum_recwords as $key => $word) { - $forum_recwords[$key]['url'] = $searchparams['url'] . '?' . $srchotquery . '&q=' . urlencode($word['word']) . '&source=word.hotopic_if.'.($key + 1).'&keywordType=recommend&hwfId=' . $v; - } - $return[$v] = tpl_index_forum_extra_output($forum_recwords); - } - - return $return; - } - -} - -class plugin_cloudsearch_group extends plugin_cloudsearch { - -} - -class plugin_cloudsearch_home extends plugin_cloudsearch { - -} \ No newline at end of file diff --git a/upload/source/plugin/cloudsearch/search_wap.class.php b/upload/source/plugin/cloudsearch/search_wap.class.php deleted file mode 100644 index 4380e8c..0000000 --- a/upload/source/plugin/cloudsearch/search_wap.class.php +++ /dev/null @@ -1,52 +0,0 @@ -allow = $cloudAppService->getCloudAppStatus('search'); - if($this->allow) { - include_once template('cloudsearch:module'); - if(!function_exists('tpl_global_header_mobile')) { - $this->allow = false; - return; - } - - if (!$searchparams) { - $searchHelper = Cloud::loadClass('Cloud_Service_SearchHelper'); - $searchparams = $searchHelper->makeSearchSignUrl(); - } - } - } - - function global_header_mobile() { - - if (!$this->allow) { - return; - } - - global $_G, $searchparams; - - $srchotquery = ''; - if(!empty($searchparams['params'])) { - foreach($searchparams['params'] as $key => $value) { - $srchotquery .= '&' . $key . '=' . rawurlencode($value); - } - } - - return tpl_global_header_mobile($searchparams, $srchotquery); - } - -} \ No newline at end of file diff --git a/upload/source/plugin/cloudsearch/switch.php b/upload/source/plugin/cloudsearch/switch.php deleted file mode 100644 index 53168fe..0000000 --- a/upload/source/plugin/cloudsearch/switch.php +++ /dev/null @@ -1,27 +0,0 @@ -_table = 'forum_forum'; - $this->_pk = 'fid'; - - parent::__construct(); - } - - public function fetch_all_forum_by_formula_for_plugin() { - $statusql = 'f.status<>\'3\''; - return DB::fetch_all("SELECT f.*, ff.*, a.uid FROM ".DB::table($this->_table)." f LEFT JOIN ".DB::table('forum_forumfield')." ff ON ff.fid=f.fid LEFT JOIN ".DB::table('forum_access')." a ON a.fid=f.fid AND a.allowview>'0' WHERE $statusql AND formulaperm<>'' ORDER BY f.type, f.displayorder"); - } -} \ No newline at end of file diff --git a/upload/source/plugin/cloudsearch/template/extend_module.css b/upload/source/plugin/cloudsearch/template/extend_module.css deleted file mode 100644 index 9785e89..0000000 --- a/upload/source/plugin/cloudsearch/template/extend_module.css +++ /dev/null @@ -1,4 +0,0 @@ -/** forum::index, forum::forumdisplay **/ -.fl_g_hot { height: 18px; overflow: hidden; } - .fl_g_hot strong, .fl_g_hot a { float: left; margin-right: 8px; font-weight: 400; white-space: nowrap; } -/** end **/ diff --git a/upload/source/plugin/cloudsearch/template/forumdisplay.htm b/upload/source/plugin/cloudsearch/template/forumdisplay.htm deleted file mode 100644 index 54c8104..0000000 --- a/upload/source/plugin/cloudsearch/template/forumdisplay.htm +++ /dev/null @@ -1,72 +0,0 @@ -{eval -function tpl_cloudsearch_forumdisplay_relatedlist($relatethreadlist, $urlkw) { -global $_G; -} - - -
- - - - - - -
-
- {lang thread} -
-
{lang cloudsearch:forum}{lang author}
-
-
- - - - - - - - - - - -
- - - - - - - - $thread['pSubject'] - - $thread['mTitle'] - - - - $thread[pForumName] - - $thread[mShowUrl] - - - - - $thread[pAuthorName] - - {lang anonymous} - - - - $thread[dateline] - -
-
- -
- {lang cloudsearch:no_content} -
- - - -{eval -} -} \ No newline at end of file diff --git a/upload/source/plugin/cloudsearch/template/index.htm b/upload/source/plugin/cloudsearch/template/index.htm deleted file mode 100644 index e69de29..0000000 diff --git a/upload/source/plugin/cloudsearch/template/keyword_hot.gif b/upload/source/plugin/cloudsearch/template/keyword_hot.gif deleted file mode 100644 index 0fbbe79..0000000 Binary files a/upload/source/plugin/cloudsearch/template/keyword_hot.gif and /dev/null differ diff --git a/upload/source/plugin/cloudsearch/template/mobile/module.htm b/upload/source/plugin/cloudsearch/template/mobile/module.htm deleted file mode 100644 index 88f5052..0000000 --- a/upload/source/plugin/cloudsearch/template/mobile/module.htm +++ /dev/null @@ -1,56 +0,0 @@ -{eval - -function tpl_global_header_mobile($searchparams, $srchotquery) { -global $_G; -} - - -
-
- - - - - - - - - - - - - - - - - - - - - - -
-
- {lang hot_search}: - - - - $val - - $val - - - -
-
-
-
- - - - -{eval -} -} diff --git a/upload/source/plugin/cloudsearch/template/module.htm b/upload/source/plugin/cloudsearch/template/module.htm deleted file mode 100644 index 01c25e4..0000000 --- a/upload/source/plugin/cloudsearch/template/module.htm +++ /dev/null @@ -1,651 +0,0 @@ -{eval -function tpl_cloudsearch_index_top($recwords, $searchparams, $srchotquery, $position = 'hotopicf') { -global $_G; -if($recwords) { -$recwords_tmp = $recwords; -$recwords = array(); -foreach ($recwords_tmp as $k => $v) { -$recwords[$k+1] = $v; -}{eval }}{eval }} - - -
-
-
- -

{if $_G['fid']}{lang cloudsearch:current}{/if}{lang cloudsearch:hottopic}

-
- - -
-
- - - - -{eval -} - -function tpl_cloudsearch_global_footer_formula_output() { -global $_G; -$formHash = FORMHASH; -$cookie = $_G['cookie']['ffids' . $_G['uid']]; -} - - - - - - -{eval -} - -function tpl_cloudsearch_viewthread_postbottom_output() { -} - -
- - -{eval -} - -function tpl_cloudsearch_forumdisplay_threadtype_extra_output($recwords) { -global $_G; -} - - - - - - -{eval -} - -function tpl_cloudsearch_forumdisplay_threadtype_inner_output() { -global $_G; -} - - -
  • {lang cloudsearch:thread_class}
  • - - -{eval -} - -function tpl_cloudsearch_collection_viewoptions_output() { -global $_G; -} - - {lang cloudsearch:realtedthread} - | - - -{eval -} - -function tpl_cloudsearch_collection_relatedop_output($threadlist, $multipage) { -global $_G; -} - - - -
    - -
    -
    - - - - - - - - -
    {lang thread}{lang cloudsearch:forum}{lang author}
    -
    - -
    - - - - - - - - - - -
    - - - - - - - - - - - - $thread['pSubject'] - - $thread['mTitle'] - - - - $thread[pForumName] - - $thread[mShowUrl] - - - - - $thread[pAuthorName] - - {lang anonymous} - - - - $thread[dateline] - -
    -
    - -
    - - - - -
    -
    - -

    - {lang cloudsearch:no_content} -

    - -
    -
    $multipage
    - - - -{eval -} - -function tpl_cloudsearch_relate_threadlist_output($kw) { -global $_G; -} - -
    loading... {lang cloudsearch:loading}
    - - - -{eval -} - -function tpl_cloudsearch_relate_threadlist_js_output($relatethreadlist, $urlkw, $searchparams, $srchotquery) { -global $_G; -} - - -
    - - - - - - - -
    {lang cloudsearch:relate}{lang cloudsearch:forum}{lang author}
    -
    - -
    - - - - - - - - - - - - - - -
    - - - - - - - - $thread['pSubject'] - - $thread['mTitle'] - - - - $thread[pForumName] - - $thread[mShowUrl] - - - - - $thread[pAuthorName] - - {lang anonymous} - - - - $thread[dateline] - -
    - {lang cloudsearch:viewmore} -
    -
    - - - -{eval -} - -function tpl_cloudsearch_global_footer_related() { -global $_G; -$rel_title = urlencode($_G['forum_thread']['subject']); -$widthauto = widthauto(); -$get_reltid = dintval($_GET[reltid]); -$get_pre_pos = dhtmlspecialchars(trim($_GET[pre_pos])); -} - - - - - - - -{eval -} - -function tpl_cloudsearch_global_footer_mini() { -global $_G; -$utilService = Cloud::loadClass('Service_Util'); -$params = array( - 's_site_gid' => $_G['groupid'], - 'response_type' => 'JSONP', -); -$params = $utilService->generateSiteSignUrl($params, false, true); -$signUrlParams = json_encode($params); -$discuz_mini_js_url = 'http://discuz.gtimg.cn/search/scripts/discuz_mini.js'; -$referer = htmlspecialchars($_SERVER['HTTP_REFERER']); -} - - - - - - - -{eval -} - -function tpl_index_forum_extra_output($forum_recwords) { -global $_G; -} - - -
    - {lang cloudsearch:forumhottopic}: - $frecword[word] -
    - - - -{eval -} - -function tpl_cloudsearch_global_footer_suggest($queryString) { -global $_G; -} - - - - -{eval -} -} \ No newline at end of file diff --git a/upload/source/plugin/cloudsearch/template/touch/module.htm b/upload/source/plugin/cloudsearch/template/touch/module.htm deleted file mode 100644 index 6e03146..0000000 --- a/upload/source/plugin/cloudsearch/template/touch/module.htm +++ /dev/null @@ -1,57 +0,0 @@ -{eval - -function tpl_global_header_mobile($searchparams, $srchotquery) { -global $_G; -} - - - - - - - - -{eval -} -} diff --git a/upload/source/plugin/cloudsearch/upgrade.php b/upload/source/plugin/cloudsearch/upgrade.php deleted file mode 100644 index b1142e4..0000000 --- a/upload/source/plugin/cloudsearch/upgrade.php +++ /dev/null @@ -1,40 +0,0 @@ - 0, - 'allow_hot_topic' => 1, - 'allow_thread_related' => 1, - 'allow_recommend_related' => 1, - 'allow_thread_related_bottom' => 0, - 'allow_forum_recommend' => 1, - 'allow_forum_related' => 0, - 'allow_collection_related' => 1, - 'allow_search_suggest' => 0, - 'cp_version' => 1, - 'recwords_lifetime' => 21600, - ); - - if (is_array($_G['setting']['my_search_data'])) { - $my_search_data = array_merge($my_search_data, $_G['setting']['my_search_data']); - } - - $insertData = serialize($my_search_data); - - $sql = << \ No newline at end of file diff --git a/upload/source/plugin/cloudunion/discuz_plugin_cloudunion.xml b/upload/source/plugin/cloudunion/discuz_plugin_cloudunion.xml deleted file mode 100644 index 9738acf..0000000 --- a/upload/source/plugin/cloudunion/discuz_plugin_cloudunion.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/upload/source/plugin/cloudunion/index.htm b/upload/source/plugin/cloudunion/index.htm deleted file mode 100644 index 0519ecb..0000000 --- a/upload/source/plugin/cloudunion/index.htm +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/upload/source/plugin/cloudunion/switch.php b/upload/source/plugin/cloudunion/switch.php deleted file mode 100644 index 0d03030..0000000 --- a/upload/source/plugin/cloudunion/switch.php +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/upload/source/plugin/xf_storage/ftn_cross.inc.php b/upload/source/plugin/xf_storage/ftn_cross.inc.php deleted file mode 100644 index a357b9b..0000000 --- a/upload/source/plugin/xf_storage/ftn_cross.inc.php +++ /dev/null @@ -1,68 +0,0 @@ -ftnFormhash()){ - exit;//showmessage('操作超时或者数据来源错误','','error'); -} - -if($_GET['ftn_submit']) { - - $data = array();$index = array(); - $filesize = intval($_GET['filesize']); - $filename = diconv(trim($_GET['filename']),'UTF-8'); - $filename = str_replace(array('\'','"','\/','\\','<','>'),array('','','','','',''),$filename); - $sha = trim($_GET['sha1']); - $index = array( - 'tid' => 0, - 'pid' => 0, - 'uid' => $_G['uid'], - 'tableid' => '127', - 'downloads' => 0 - ); - $aid = C::t('forum_attachment')->insert($index, 1); - - $data = array( - 'aid' => $aid, - 'uid' => $_G['uid'], - 'dateline' => $_G['timestamp'], - 'filename' => $filename, - 'filesize' => $filesize, - 'attachment' => 'storage:' . $sha, - 'remote' => 0, - 'isimage' => 0, - 'width' => 0, - 'thumb' => 0, - ); - C::t('forum_attachment_unused')->insert($data); - if(empty($_GET['allcount']) && empty($_GET['uploadedcount']) && empty($_GET['errorcount'])){ - exit; - } else { - if($_GET['allcount'] == ($_GET['uploadedcount'] + $_GET['errorcount'])){ - $allowUpdate = 1; - } else { - $allowUpdate = 0; - } - include template('xf_storage:cross'); - } -} \ No newline at end of file diff --git a/upload/source/plugin/xf_storage/ftn_upload.inc.php b/upload/source/plugin/xf_storage/ftn_upload.inc.php deleted file mode 100644 index 7e4bca9..0000000 --- a/upload/source/plugin/xf_storage/ftn_upload.inc.php +++ /dev/null @@ -1,21 +0,0 @@ -ftnFormhash(); - $iframeurl = $storageService->makeIframeUrl($ftnFormhash); -} else { - $iframeurl = ''; -} - -include template('xf_storage:upload'); \ No newline at end of file diff --git a/upload/source/plugin/xf_storage/index.htm b/upload/source/plugin/xf_storage/index.htm deleted file mode 100644 index e69de29..0000000 diff --git a/upload/source/plugin/xf_storage/template/cross.htm b/upload/source/plugin/xf_storage/template/cross.htm deleted file mode 100644 index 64e05bf..0000000 --- a/upload/source/plugin/xf_storage/template/cross.htm +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - diff --git a/upload/source/plugin/xf_storage/template/css.htm b/upload/source/plugin/xf_storage/template/css.htm deleted file mode 100644 index d4093ec..0000000 --- a/upload/source/plugin/xf_storage/template/css.htm +++ /dev/null @@ -1,39 +0,0 @@ - - - - diff --git a/upload/source/plugin/xf_storage/template/editor.htm b/upload/source/plugin/xf_storage/template/editor.htm deleted file mode 100644 index ec47c34..0000000 --- a/upload/source/plugin/xf_storage/template/editor.htm +++ /dev/null @@ -1,4 +0,0 @@ - -
  • {lang xf_storage:xf_storage_btn}
  • - - diff --git a/upload/source/plugin/xf_storage/template/ftn.png b/upload/source/plugin/xf_storage/template/ftn.png deleted file mode 100644 index 27cea33..0000000 Binary files a/upload/source/plugin/xf_storage/template/ftn.png and /dev/null differ diff --git a/upload/source/plugin/xf_storage/template/ftnupload.htm b/upload/source/plugin/xf_storage/template/ftnupload.htm deleted file mode 100644 index b8ee97c..0000000 --- a/upload/source/plugin/xf_storage/template/ftnupload.htm +++ /dev/null @@ -1,129 +0,0 @@ - - - - - diff --git a/upload/source/plugin/xf_storage/template/index.htm b/upload/source/plugin/xf_storage/template/index.htm deleted file mode 100644 index e69de29..0000000 diff --git a/upload/source/plugin/xf_storage/template/jscode.htm b/upload/source/plugin/xf_storage/template/jscode.htm deleted file mode 100644 index c82e3b2..0000000 --- a/upload/source/plugin/xf_storage/template/jscode.htm +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/upload/source/plugin/xf_storage/template/link.htm b/upload/source/plugin/xf_storage/template/link.htm deleted file mode 100644 index fe17db5..0000000 --- a/upload/source/plugin/xf_storage/template/link.htm +++ /dev/null @@ -1,5 +0,0 @@ - -

    -{lang xf_storage:download_xf} -

    - diff --git a/upload/source/plugin/xf_storage/template/upload.htm b/upload/source/plugin/xf_storage/template/upload.htm deleted file mode 100644 index 9021bb0..0000000 --- a/upload/source/plugin/xf_storage/template/upload.htm +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/upload/source/plugin/xf_storage/xf_storage.class.php b/upload/source/plugin/xf_storage/xf_storage.class.php deleted file mode 100644 index 07c8d7d..0000000 --- a/upload/source/plugin/xf_storage/xf_storage.class.php +++ /dev/null @@ -1,111 +0,0 @@ -appStatus = $cloudAppService->getCloudAppStatus('storage'); - } - - public function common(){ - global $_G; - if (!$this->appStatus) { - return false; - } - if(CURMODULE == 'post' && CURSCRIPT == 'forum' && $_G['uid']){ - $_G['config']['output']['iecompatible'] = '7'; - } - - return true; - } - - public function global_footer(){ - if (!$this->appStatus) { - return false; - } - include template('xf_storage:css'); - - return $return; - } - - public function _output($aid, $sha, $filename) { - include_once libfile('function/attachment'); - $storageService = Cloud::loadClass('Service_Storage'); - - $qqdlUrl = $storageService->makeQQdlUrl($sha, $filename); - $aidencode = packaids(array('aid' => $aid)); - include template('xf_storage:link'); - - return $return; - } - - public function _jsOutput($aid, $return) { - $spanId = 'attach_' . $aid; - $return = str_replace(array("\r\n", '\'', '

    ', '

    ', "\n"), array('', '\\\''), $return); - include template('xf_storage:jscode'); - - return $jscode; - } - -} - -class plugin_xf_storage_forum extends plugin_xf_storage { - - public function post_attach_btn_extra() { - global $_G; - if (!$this->appStatus) { - return false; - } - include template('xf_storage:editor'); - - return $return; - } - - public function post_attach_tab_extra() { - global $_G; - if (!$this->appStatus) { - return false; - } - $editorid = 'e'; - include template('xf_storage:ftnupload'); - - return $return; - } - - public function viewthread_attach_extra_output() { - global $postlist, $_G; - $return = array(); - foreach ($postlist as $pid => $post) { - foreach ($post['attachments'] as $aid => $attachment) { - if (strpos($attachment['attachment'], 'storage:') !== false) { - $sha1 = substr($attachment['attachment'], -40); - $return[$aid] = $this->_output($aid, $sha1, $attachment['filename']); - if (in_array($aid, $_G['forum_attachtags'][$pid])) { - $postlist[$pid]['message'] .= $this->_jsOutput($aid, $return[$aid]); - unset($return[$aid]); - } - if ($attachment['isimage']) { - unset($return[$aid]); - } - } - } - } - return $return; - } -} \ No newline at end of file