点击登录
  • 欢迎访问无限星辰技术博客,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站 QQ群
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏无限星辰吧
  • 好集导航开张了,传送门:好集导航

Discuz!x3.1游客看不到keyword与description的解决方案

Discuz!问题集 crx349 4791次浏览 0个评论 扫描二维码

游客看不到 keyword 与 description的解决方法

需要修改的文件:source/class/helper/helper_seo.php

1
2
3
4
5
6
7
8
9
if($descriptiontext && (isset($_G['makehtml']) || CURSCRIPT == 'forum' || IS_ROBOT || $_G['adminid'] == 1)) {
$seodescription = helper_seo::strreplace_strip_split($searchs, $replaces, $descriptiontext);
}
if($keywordstext && (isset($_G['makehtml']) || CURSCRIPT == 'forum' || IS_ROBOT || $_G['adminid'] == 1)) {
$seokeywords = helper_seo::strreplace_strip_split($searchs, $replaces, $keywordstext);
}
}
return array($seotitle, $seodescription, $seokeywords);
}

改为

1
2
3
4
5
6
7
8
9
if($descriptiontext) {
$seodescription = helper_seo::strreplace_strip_split($searchs, $replaces, $descriptiontext);
}
if($keywordstext && (isset($_G['makehtml']) || CURSCRIPT == 'forum' || IS_ROBOT || $_G['adminid'] == 1)) {
$seokeywords = helper_seo::strreplace_strip_split($searchs, $replaces, $keywordstext);
}
}
return array($seotitle, $seodescription, $seokeywords);
}

代码:

1
2
3
4
5
6
if($keywordstext && (isset($_G['makehtml']) || CURSCRIPT == 'forum' || IS_ROBOT || $_G['adminid'] == 1)) {
$seokeywords = helper_seo::strreplace_strip_split($searchs, $replaces, $keywordstext);
}
}
return array($seotitle, $seodescription, $seokeywords);
}

改为

1
2
3
4
5
6
7
if($keywordstext) {
$seokeywords = helper_seo::strreplace_strip_split($searchs, $replaces,
$keywordstext);
}
}
return array($seotitle, $seodescription, $seokeywords);
}

无限星辰 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明Discuz!x3.1游客看不到keyword与description的解决方案!
喜欢 (0)
[]
分享 (0)

您必须 登录 才能发表评论!