Discuz !X3.2 门户keyword与description查看源码不显示方法
source/class/helper/helper_seo.php
搜索:
if($descriptiontext && (isset($_G['makehtml']) || CURSCRIPT == 'forum' || IS_ROBOT || $_G['adminid'] == 1))
改为:
if($descriptiontext && (isset($_G['makehtml']) || CURSCRIPT == 'forum' || CURSCRIPT == 'portal' || IS_ROBOT || $_G['adminid'] == 1))
搜索:
if($keywordstext && (isset($_G['makehtml']) || CURSCRIPT == 'forum' || IS_ROBOT || $_G['adminid'] == 1)) {
修改成:
if($keywordstext && (isset($_G['makehtml']) || CURSCRIPT == 'forum' || CURSCRIPT == 'portal' || IS_ROBOT || $_G['adminid'] == 1)) {
如果想要完全放开SEO设置给游客看,那么可以
将
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);
}
改为
if($descriptiontext) {
$seodescription = helper_seo::strreplace_strip_split($searchs, $replaces, $descriptiontext);
}
if($keywordstext) {
$seokeywords = helper_seo::strreplace_strip_split($searchs, $replaces, $keywordstext);
}
替换好上传到网站覆盖原文件即可
页:
[1]