分享吧分享吧

彻底去掉头部Powered by Discuz!与横杠的方法

作者:分享吧分享吧   发布时间:2015-09-22 08:30   回复数:1   浏览数:401
分享吧分享吧
4011分享吧分享吧步入草根
2015-09-22 08:30:27
4011 2015-09-22 08:30:27
话题: helper_seo
打开目录template\default\common下的header_common.htm文件,搜索:
<title><!--{if !empty($navtitle)}-->$navtitle - <!--{/if}--><!--{if empty($nobbname)}-->

$_G['setting']['bbname'] - <!--{/if}--> Powered by Discuz!</title>替换为:
<title><!--{if !empty($navtitle)}-->$navtitle<!--{/if}--><!--{if empty($nobbname)}--> -

$_G['setting']['bbname']<!--{/if}--></title>

再修改文件:source\class\helper\helper_seo.php
查找:
public static function strreplace_strip_split($searchs, $replaces, $str) {
    $searchspace = array('((\s*\-\s*)+)', '((\s*\,\s*)+)', '((\s*\|\s*)+)', '((\s*\t\s*)

+)', '((\s*_\s*)+)');
    $replacespace = array('-', ',', '|', ' ', '_');
    return trim(preg_replace($searchspace, $replacespace, str_replace($searchs, $replaces,

$str)), ' ,-|_');
    }替换为:
public static function strreplace_strip_split($searchs, $replaces, $str) {
    $searchspace = array('(((\s)*\-(\s)*)+)', '(((\s)*\,(\s)*)+)', '(((\s)*\|(\s)*)+)',

'(((\s)*\t(\s)*)+)', '(((\s)*_(\s)*)+)');
    $replacespace = array('$3-$3', '$3,$3', '$3|$3', '$3 $3', '$3_$3');
    return trim(preg_replace($searchspace, $replacespace, str_replace($searchs, $replaces,

$str)), ' ,-|_');
    }

游客
登录后才可以回帖,登录 或者 注册