dedecms織夢文章管理系統SEO功能優化的幾個小技法

dedecms織夢文章管理系統SEO功能優化的幾個小技法dedecms織夢文章管理系統的運用功能中的局部調試,運用技法,對於SEO優化,功能擴展都很管用果,有運用織夢的朋友,可以看看,本人在蘇州SEO運用了織夢dedecms系統,效果還不賴。也是尋找收集了一點網上揭曉的功能調試的小技法與大家分享。

1、在{dede:artlist}{/dede:artlist}中把time的顯露款式由0000-00-00改為其它款式
[field:pubdate function=’strftime(百分之百m-百分之百d,@me)’/] 款式00-00
[field:pubdate function=’strftime(百分之百m/百分之百d,@me)’/] 款式00/00
[field:pubdate function=’strftime(百分之百y/百分之百m/百分之百d,@me)’/] 0000/00/00
2、欄目名字邊上加(文章條數)功能
辦法: 敞開 \include\inc_arcpart_view.php 在 //取得一個類目標鏈接信息 下邊找到
if(!is_array($row)) return ;
在其上頭加上兩行:
$countarc = $this-dsql-GetOne(Select count(ID) as dd From #@__archives where typeid=’$typeid’);
$row[‘totalarc’]=$countarc[‘dd’];
而後 在 模版的 [field:typename /] 後加上 ( [field:totalarc /] ) 調配使用即可!

 

3、有關文章更有關的改正辦法
有關的涵義是:文章的關鍵字和其他文章的關鍵字相同還是文章的關鍵字在其他文章標題中。
在inc_fun_SpGetArcList.php中可以見得
$orwhere .= And CONCAT(arc.title,arc.keywords) REGEXP ‘$rstr’ ;
原帖mylove2046寫的:
有關文章的准確改正辦法
不管是V3版仍然V4版,有關文章都不有關,改正辦法如下所述:
includeinc_archives_view.php
在第330行近旁找到
if($tagname==likeart) $keywords = ; //str_replace( ,,,trim($this-Fields[‘keywords’]));
改為
if($tagname==likeart) $keywords = str_replace( ,,,trim($this-Fields[‘keywords’]));
在335行近旁找到
else if($tagname==likeart) $orderby = near;
改為
else if($tagname==likeart) $orderby = id;

 

實際上改動一下子代碼和系統配備布置,其他配備布置裡邊的系統變量,運用網站關鍵詞關連文章:

 

if($tagname==likeart) $keywords = ; //str_replace( ,,,trim($this-Fields[‘keywords’]));
改為
if($tagname==likeart) $keywords = str_replace( ,,,trim($this-Fields[‘keywords’]));

 

4、dedecms會員登錄後改正私人資料報錯
現象
member\index_do.php on line 262
解決方法
在 $dsql-SetQuery($query);之前加上一段
$dsql = new DedeSql();

 

5、Tag加鏈接
{dede:field name=’keywords’ runphp=’yes’ }
if(!empty(@me)){
$kws = explode(‘ ‘,@me);
@me = ;
foreach($kws as $k){
@me .= a href=’/plus/search.php?keyword=$k’ target=’blank’$k/a ;
}
@me= str_replace(‘+’, ‘ ‘,trim(@me));
}
{/dede:field}

 

6、欄目合並:
update dede_archives set typeid=新ID where typeid=原ID
update dede_addonarticle set typeid=新ID where typeid=原ID

 

6、新文章帶NEW
[field:senddate runphp=’yes’]
$ntime = time();
$oneday = 3600 * 24;
if(($ntime – @me)$oneday) @me = font color=’red'[new]/font;
else @me = ;
[/field:senddate]

 

7、LOOP標記調配使用最新述評
{dede:loop table=dede_feedback sort=dtime row=5}
a href=’http://xxxxx/plus/view.php?aid=[field:aid /]’ target=_blank title=’文章題目:[field:arctitle/]
述評時間:[field:dtime function=GetDateMk(‘@me’)/]
宣布筆者:[field:username /]’
[field:msg function=cn_substr(‘@me’,50) /]
/a
br
{/dede:loop}

 

出處:demoseo