Discuz X 2.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) 这个判断语句。
|