dedecms根據(jù)文章標題自動獲取tag,織夢文章
導(dǎo)讀:織夢文章織夢文章關(guān)鍵字描述:獲取 自動 標題 根據(jù) 文章 quot tag sp-hdede5.7模板織夢首頁模板。
關(guān)鍵字描述dede商城模板:獲取 自動 標題 根據(jù) 文章   " tag sp-> if
圖片:
圖片:
圖片:
看到論壇上有人跟我一樣有這個需要,就嘗試著弄了下,經(jīng)測試可以根據(jù)文章標題自動獲取tag我對php不熟悉,是瞎改的,不知道會不會有什么其他影響,修改請慎重……修改:\dede\action目錄article_add_action.php文件在【//寫入Tag索引】與【InsertTags($dsql,$tag,$arcID,0,$typeid,$arcrank);】之間插入:
Copy code
if($autokey==1){ require_on織夢模板ce(DEDEADMIN."/../include/pub_splitword_[url]www.php[/url]"); $tag = ""; $sp = new SplitWord(); $titleindexs = explode(" ",trim($sp->GetIndexText($sp->SplitRMM($title)))); //$allindexs = explode(" ",trim($sp->GetIndexText($sp->SplitRMM(Html夢織模板2Text($body)),200))); if(/*is_array($allindexs) && */is_array($titleindexs)){ foreach($titleindexs 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("/ 上一頁12 下一頁相關(guān)dede5.7模板織夢首頁模板。聲明: 本文由我的SEOUC技術(shù)文章主頁發(fā)布于:2023-07-19 ,文章dedecms根據(jù)文章標題自動獲取tag,織夢文章主要講述標題,根據(jù),織夢網(wǎng)站建設(shè)源碼以及服務(wù)器配置搭建相關(guān)技術(shù)文章。轉(zhuǎn)載請保留鏈接: http://www.bifwcx.com/article/web_30281.html