帝國(guó)CMS用(yòng)靈動标簽≥"調用(yòng)tag的(de)最詳細教程
來(lái)源:創立工(gōng)作(zuò)室 作(zuò)者:馮軍 發布時(∞☆<↓shí)間(jiān):2024-09-20 16:36:27 閱讀σ¶∞'(dú) 941 次
第一(yī)種 普通(tōng)靈動标簽調用(yòng)
1、 用(yòng)名稱的(de)調用(yòng) tagname=<?=$bqr['tag'ππ♦name']?>
[e:loop={"select * f≠← &rom [!db.pre!]enewstags order by tagid",>÷±♥0,24,0}]
<a href='<?=$public_r[××newsurl]?>e/tags/?tagname=<?=$bq"®₩r['tagname']?>' class='tag-link-&♣÷lt;?=$bqr['tagid']?>' title='<•'♥?=$bqr[num]?>個(gè)話(huà)題' sty'×↕©le='font-size: 9pt;' tσ↑arget="_blank"><?=$bqr['tagname']?>λ↕(<?=$bqr[num]?>)&π∞lt;/a>
[/e:loop]
或
[e:loop={"select * from [!db.pre!γ✔α]enewstags order by num DESC limi≤™↓←t 20",0,24,0}]
<?
echo '<"&↕a href="/e/tags/?tagname='.urlencode($bqr['tag₹¥₹name']).'" target="_blank" ₽$•title="'.$bqr['num'].'個(gè)話(huà)題" >'.φ£$bqr['tagname'].'('.$bqr['num'].')</a&g↑σ≥"t;';
?>
[/e:loop]
注釋:[e:loop={"select * fro ₹∞ m [!db.pre!]enewstags ord$←er by tagid",0,24,0}] sal查詢tag
<?=$public_r[newsurl]?>e/t₹¶ags/?tagname=<?=$bqr['¶π$∑tagname']?> 即 http://127.0.0.1/e₩↕ε✘/tag/?tagname=tag名稱
<?=$bqr['tagid']?π≤♠α> tag的(de)id
<?=$bqr[num]?> 如(¶♥φ'rú):關于“美(měi)女(nǚ)”的♦∑>(de)tag詞有(yǒu)多(duō)少(shǎo)個(gè),即統計(jì§₹α)tag相(xiàng)關數(shù)
<?=$bqr['£↕↑tagname']?> tag名稱:如(rú♥✔×)“美(měi)女(nǚ)”
2 用(yòng)id的(de)調用(yòng) tagiπ γd=<?=$bqr['tagid']?> 注釋:不(bù)α& 能(néng)用(yòng)--用(yò₹♠ng)tagid做(zuò)url地(dì)址不(bù)行(xíng)
[e:loop={"select * from [!db.pre!]enews→≈>tags order by tagid",0,24,0}]
&¶↕&'lt;li><a href="/e/tags/?tag&♥↑id=<?=$bqr['tagid']?≥ε>" target="_blank"><?=$bqr['tagnam↕↑↔↕e']?></a></li&✘γ"gt;
[/e:loop]
第二種 靈動标簽+php輸出式
[e:loop={"select * from [!db.pre!]enewλ>♣stags order by num DEβ×SC limit 20",0,24,0}]
< "±?
echo '<a href="<?=> φ✔$public_r[newsurl]?>e/tags/?tagnamσ¥ ♠e='.urlencode($bqr['tagname']).'" target="_bl& δank" title="'.$bqr['num'].'個(gè)話(huà)題" >σ¥λ;'.$bqr['tagname'].'('.$bqr['num']λφ♥ .')</a>';
?>
[/e:loop<Ω]
注意:如(rú)果想調用(yòng)幾條 添加limit 20 調用(yòn&">€g)20條
如(rú):
1、按ID調用(yòng)(新的(de)靠前)
[e:loop={"select * from [!db.pre!]enewstags ord<•×er by tagid limit 20",45,24,0}] →₩ tagid後加limit 20
2、按數(shù)量調用(yòng)(信息數(shù)多(duō)的(de)©∞₹"靠前)
[e:loop={"select * from [!db.pre!]enew₩>•'stags order by num D₩♦ESC limit 20",0,24,0}] ≠¥♥₩ num DESC後加limit 20
- 上(shàng)一(yī)篇:将惡意登陸IP添加到(dào)防火(huǒ)牆
- 下(xià)一(yī)篇:帝國(guó)CMS 內(nèi)容頁如(rú)何調用(yòng)tag标δ₹↕簽 動态url和(hé)僞靜(jìng)态 url