游客看不到 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); } |