有时我发现论坛一些版本不需要了要怎么删除呢,本文章就来告诉你discuz x2.5删除论坛首页和版块页面热点话题方法.
discuz x2.5删除论坛首页和版块页面热点话题:
在文件 sourceplugincloudsearchsearch.class.php 中.
1.删除index_top_output函数,去除首页热门话题,代码如下:
- public function index_top_output() {
- if($this->allow) {
- $searchparams = makeSearchSignUrl();
- $recwords = $this->getRecWords();
- $srchotquery = '';
- if(!emptyempty($searchparams[1])) {
- foreach($searchparams[1] as $key => $value) {
- $srchotquery .= '&' . $key . '=' . $value;
- }//开源软件:Vevb.com
- }
- return tpl_cloudsearch_index_top($recwords, $searchparams, $srchotquery);
- }
- }
2.查找index_catlist_top_output和forumdisplay_middle_output两个函数并删除,代码如下:
- 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(!emptyempty($searchparams['params'])) {
- foreach($searchparams['params'] as $key => $value) {
- $srchotquery .= '&' . $key . '=' . rawurlencode($value);
- }
- }
- return tpl_cloudsearch_index_top($recwords, $searchparams, $srchotquery);
- }
- 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(!emptyempty($searchparams['params'])) {
- foreach($searchparams['params'] as $key => $value) {
- $srchotquery .= '&' . $key . '=' . rawurlencode($value);
- }
- }
- $result = tpl_cloudsearch_index_top($recwords, $searchparams, $srchotquery, 'hotopic_fm');
- }
- return $result;
- }
新闻热点
疑难解答