本帖最后由 雨沐枫 于 2012-4-24 13:31 编辑
Discuz X2.5中游客看不到 keyword 与 description的解决方法
需要修改的文件:source/class/helper/helper_seo.php- if($descriptiontext && (CURSCRIPT == 'forum' || IS_ROBOT || $_G['adminid'] == 1)) {
- $seodescription = helper_seo::strreplace_strip_split($searchs, $replaces, $descriptiontext);
- }
- if($keywordstext && (CURSCRIPT == 'forum' || IS_ROBOT || $_G['adminid'] == 1)) {
- $seokeywords = helper_seo::strreplace_strip_split($searchs, $replaces, $keywordstext);
复制代码- if($descriptiontext) {
- $seodescription = helper_seo::strreplace_strip_split($searchs, $replaces, $descriptiontext);
- }
- if($keywordstext) {
- $seokeywords = helper_seo::strreplace_strip_split($searchs, $replaces, $keywordstext);
复制代码 简单的来说就是去掉 && (CURSCRIPT == 'forum' || IS_ROBOT || $_G['adminid'] == 1) 这个判断语句。
演示:http://www.75430.com
|