| Discuz X2.5和Discuz X2都有同樣的問(wèn)題,就是在用戶未登錄的時(shí)候,看到的keywords和description都是“首頁(yè)”,其實(shí),搜索引擎收錄的時(shí)候,是能獲取到這兩個(gè)值的,不用擔(dān)心。只是,這樣看起來(lái)不夠友好,所以,我們需要修改一下。:) 找到這個(gè)文件:source/class/helper/helper_seo.php
 把以下代碼:
 替換為:復(fù)制代碼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);
}
保存,即可!轉(zhuǎn)載請(qǐng)注明來(lái)源:http://wangaiche.com復(fù)制代碼if($descriptiontext) {
    $seodescription = helper_seo::strreplace_strip_split($searchs, $replaces, $descriptiontext);
}
if($keywordstext) {
    $seokeywords = helper_seo::strreplace_strip_split($searchs, $replaces, $keywordstext);
}
 
 
 
 
 |