欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Discuz X3/3.1 門(mén)戶中的Keyword和Description顯示不正確的解決方法

  發(fā)布時(shí)間:2015-03-25 11:35:21   作者:佚名   我要評(píng)論
這篇文章主要介紹了Discuz X3/3.1 門(mén)戶中的Keyword和Description顯示不正確的解決方法,默認(rèn)顯示的是游客能看到的,而Discuz 對(duì)游客屏蔽了關(guān)鍵詞與描述,為了SEO,還是讓它正常顯示吧,需要的朋友可以參考下

最近用站長(zhǎng)工具查論壇的 SEO 的時(shí)候,忽然發(fā)現(xiàn),論壇門(mén)戶的 Keyword(關(guān)鍵詞) 和 Description(描述)都只剩下門(mén)戶倆字了。原來(lái) Discuz 對(duì)游客屏蔽了關(guān)鍵詞與描述。雖然說(shuō)用管理員賬號(hào)登陸后,可以正常顯示了。不過(guò)很難說(shuō)蜘蛛或Robot是不是可以真正能獲取。所以為了收錄,還是改回來(lái)吧。具體方法為:

找到文件“ source/class/helper/helper_seo.php ”這個(gè)文件

搜索:


復(fù)制代碼
代碼如下:

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);
}

修改為:


復(fù)制代碼
代碼如下:

if($descriptiontext) {
$seodescription = helper_seo::strreplace_strip_split($searchs, $replaces, $descriptiontext);
}
if($keywordstext) {
$seokeywords = helper_seo::strreplace_strip_split($searchs, $replaces, $keywordstext);
}

OK,最后登出后,再用游客身份查看源代碼,已經(jīng)可以看到 Description 和 Keyword 了,在用站長(zhǎng)SEO工具測(cè)試一下,也OK了。。

完事大吉!

相關(guān)文章

最新評(píng)論