DEDE設置根據文章標題自動獲取tag的方法織夢技巧
導讀:織夢技巧織夢技巧DEDE設置根據文章標題自動獲取tag的方法: 修改:\dede\action目錄article_add_action.php文件 在【//寫入Tag索引】與【網站seo優化網站建設制作。
DEDE設置根據文章標題自動獲取tag網站seo優化診斷工具的方法: 修改:\dede\action目錄article_add_action.php文件 在【//寫入Tag索引】與【InsertTags($dsql,$tag,$arcID,0,$typeid,$arcrank);】之間插入: if($autokey==1){ require_onc […]
DEDE設置根據文章標題自動獲取tag的方法:
修改:\dede\action目錄article_add_action.php文件
在【//寫入Tag索引】與【InsertTags($dsql,$tag,$arcID,0,$typeid,$arcrank);】之間插入:
if($autokey==1){ require_once(DEDEADMIN."/../include/pub_splitword_[url]www.php[/url]"); $tag = ""; $sp = new SplitWord(); $titleindexs = explode(" ",trim($sp->GetIndexText($sp->SplitRMM($title)))); //$allin網站推廣優化seodexs = explode(" ",trim($sp->GetIndexText($sp->SplitRMM(Html2Text($body)),200))); if(/*is_array($allindexs) && */is_array($titleindexs)){ foreach($ti網站seo優化培訓tleindexs as $k){ if(strlen($tag)>=50) break; else $tag .= $k." "; } /*foreach($allindexs as $k){ if(strlen($keywords)>=50) break; else if(!in_array($k,$titleindexs)) $keywords .= $k." "; }*/ } $sp->Clear(); unset($sp); //$tag = preg_replace("/#1#|#2#/","",$tag); $tag = addslashes($tag); }
1 等于 p
2 等于 e
分頁干擾 所以替換
默認只對文章標題分詞,要想加入內容分詞請刪除注釋!
聲明: 本文由我的SEOUC技術文章主頁發布于:2023-05-26 ,文章DEDE設置根據文章標題自動獲取tag的方法織夢技巧主要講述標題,根據,DEDE設置根據文章標題自動獲取tag的方網站建設源碼以及服務器配置搭建相關技術文章。轉載請保留鏈接: http://www.bifwcx.com/article/web_9039.html