一聚教程网:一个值得你收藏的教程网站

热门教程

discuz x2.5删除论坛首页和版块页面热点话题

时间:2022-06-25 16:30:34 编辑:袖梨 来源:一聚教程网

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(!empty($searchparams[1])) {
foreach($searchparams[1] as $key => $value) {
$srchotquery .= '&' . $key . '=' . $value;
}
}
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(!empty($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(!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;
}

热门栏目