无限星辰工作室-客户无限互联网动力之源

标题: Discuz !X3.2 门户keyword与description查看源码不显示方法 [打印本页]

作者: crx349    时间: 2015-4-1 20:07
标题: Discuz !X3.2 门户keyword与description查看源码不显示方法

source/class/helper/helper_seo.php

搜索:
                       
  1. if($descriptiontext && (isset($_G['makehtml']) || CURSCRIPT == 'forum' || IS_ROBOT || $_G['adminid'] == 1))
复制代码




改为:
                     
  1.   if($descriptiontext && (isset($_G['makehtml']) || CURSCRIPT == 'forum' || CURSCRIPT == 'portal' || IS_ROBOT || $_G['adminid'] == 1))
复制代码



搜索:
                     
  1. if($keywordstext && (isset($_G['makehtml']) || CURSCRIPT == 'forum' || IS_ROBOT || $_G['adminid'] == 1)) {
复制代码





修改成:

  1.                       if($keywordstext && (isset($_G['makehtml']) || CURSCRIPT == 'forum' || CURSCRIPT == 'portal' || IS_ROBOT || $_G['adminid'] == 1)) {
复制代码





如果想要完全放开SEO设置给游客看,那么可以


                     
  1.   if($descriptiontext && (isset($_G['makehtml']) || CURSCRIPT == 'forum' || IS_ROBOT || $_G['adminid'] == 1)) {
  2.                                 $seodescription = helper_seo::strreplace_strip_split($searchs, $replaces, $descriptiontext);
  3.                         }
  4.                         if($keywordstext && (isset($_G['makehtml']) || CURSCRIPT == 'forum' || IS_ROBOT || $_G['adminid'] == 1)) {
  5.                                 $seokeywords = helper_seo::strreplace_strip_split($searchs, $replaces, $keywordstext);
  6.                         }
复制代码




改为

                     
  1. if($descriptiontext) {
  2.                                 $seodescription = helper_seo::strreplace_strip_split($searchs, $replaces, $descriptiontext);
  3.                         }
  4.                         if($keywordstext) {
  5.                                 $seokeywords = helper_seo::strreplace_strip_split($searchs, $replaces, $keywordstext);
  6.                         }
复制代码





替换好上传到网站覆盖原文件即可




欢迎光临 无限星辰工作室-客户无限互联网动力之源 (https://www.xmspace.net/) Powered by Discuz! X3.4