首页 > CMS > Discuz > 正文

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

2024-09-11 09:03:16
字体:大 中 小
来源:转载
供稿:网友

有时我发现论坛一些版本不需要了要怎么删除呢,本文章就来告诉你discuz x2.5删除论坛首页和版块页面热点话题方法.

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

在文件 sourceplugincloudsearchsearch.class.php 中.

1.删除index_top_output函数,去除首页热门话题,代码如下:

  1. public function index_top_output() { 
  2. if($this->allow) { 
  3. $searchparams = makeSearchSignUrl(); 
  4. $recwords = $this->getRecWords(); 
  5. $srchotquery = ''; 
  6. if(!emptyempty($searchparams[1])) { 
  7. foreach($searchparams[1] as $key => $value) { 
  8. $srchotquery .= '&' . $key . '=' . $value; 
  9. }//开源软件:Vevb.com 
  10. } 
  11. return tpl_cloudsearch_index_top($recwords, $searchparams, $srchotquery); 
  12. } 
  13.  
  14. } 

2.查找index_catlist_top_output和forumdisplay_middle_output两个函数并删除,代码如下:

  1. public function index_catlist_top_output() { 
  2. if(!$this->allow || !$this->allow_hot_topic) { 
  3. return; 
  4. } 
  5.  
  6. global $searchparams; 
  7.  
  8. $searchHelper = Cloud::loadClass('Service_SearchHelper'); 
  9. $recwords = $searchHelper->getRecWords(14, 'assoc'); 
  10. $srchotquery = ''; 
  11. if(!emptyempty($searchparams['params'])) { 
  12. foreach($searchparams['params'] as $key => $value) { 
  13. $srchotquery .= '&' . $key . '=' . rawurlencode($value); 
  14. } 
  15. } 
  16. return tpl_cloudsearch_index_top($recwords, $searchparams, $srchotquery); 
  17. } 
  18.  
  19.  
  20. public function forumdisplay_middle_output() { 
  21. if(!$this->allow || !$this->allow_forum_recommend) { 
  22. return; 
  23. } 
  24.  
  25. global $_G, $searchparams; 
  26. $result = ''; 
  27. if ($_G['fid']) { 
  28. $searchHelper = Cloud::loadClass('Service_SearchHelper'); 
  29. $recwords = $searchHelper->getRecWords(14, 'assoc', $_G['fid']); 
  30. $srchotquery = ''; 
  31. if(!emptyempty($searchparams['params'])) { 
  32. foreach($searchparams['params'] as $key => $value) { 
  33. $srchotquery .= '&' . $key . '=' . rawurlencode($value); 
  34. } 
  35. } 
  36. $result = tpl_cloudsearch_index_top($recwords, $searchparams, $srchotquery, 'hotopic_fm'); 
  37. } 
  38.  
  39. return $result; 
  40. }

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表