免费一级码无码婬片AA,多姿,国产成人精品日本亚洲18图 ,亚洲欧美视频一区,久久久久国产精品一区

做網(wǎng)站找實(shí)速,專業(yè)網(wǎng)站制作設(shè)計(jì)平臺(tái)
首頁(yè) > 課堂 > 網(wǎng)站技術(shù) > 詳情
網(wǎng)站標(biāo)簽 / Tags

帝國(guó)CMS列表頁(yè)調(diào)用文章tag兩種方法

2020-02-16 15:36:49   來源:實(shí)速網(wǎng)絡(luò)|網(wǎng)站建設(shè)|網(wǎng)站設(shè)計(jì)|網(wǎng)站優(yōu)化|網(wǎng)站仿制|網(wǎng)站SEO|網(wǎng)站推廣|空間域名|主機(jī)VPS|服務(wù)器|網(wǎng)站源碼|網(wǎng)站模版   瀏覽: 次
帝國(guó)CMS列表頁(yè)調(diào)用文章tag兩種方法 發(fā)布時(shí)間:2019-12-17 來源:未知 瀏覽: 關(guān)鍵詞:列表頁(yè) 帝國(guó)CMS 調(diào)用 tag

帝國(guó)CMS列表頁(yè)調(diào)用文章tag兩種方法

發(fā)布時(shí)間:2019-12-17 來源:未知 瀏覽: 關(guān)鍵詞:列表頁(yè) 帝國(guó)CMS 調(diào)用 tag 

列表頁(yè)調(diào)用tag的方法有兩種,一種是切割副表的infotags字段,第二種種是從phome_enewstagsdata表中提取。如果采用tagid或tag靜態(tài)化,則推薦使用第二種方法,效率更高。如果采用tagname的動(dòng)態(tài)鏈接方式,可以采用第一種方法。

第一種方法:切割infotags字段

/* 列表頁(yè)顯示tag 開始*/$tagstr='';$infotags_r=explode(',',$r['infotags']);$tagscount=count($infotags_r);for($i=0;$i<$tagscount;$i++){$tagname=$infotags_r[$i];if(empty($tagname)){continue;}//tagname的動(dòng)態(tài) 或 偽靜態(tài) 時(shí)的鏈接,采用以下1行代碼/*$tagslink=eReturnRewriteTagsUrl(0,$tagname);*///tagid式的動(dòng)態(tài)鏈接,采用以下6行代碼$tt=$empire->fetch1("select * from {$dbtbpre}enewstags where tagname='".$tagname."' limit 1");if(!$tt['tagid']){continue;}else{$tagslink=$public_r['newsurl'].'e/tags/?tagid='.$tagid;;}//采用東坡網(wǎng)靜態(tài)化插件時(shí)的tag鏈接,采用以下6行代碼/*$tt=$empire->fetch1("select * from {$dbtbpre}enewstags where tagname='".$tagname."' limit 1");if(!$tt['tagid']){continue;}else{$tagslink=user_HtmlTagLink($tt['tagid']);}*///返回單獨(dú)一個(gè)tag的代碼$tagstr.='<a title="'.$tagname.'" target="_blank" href="'.$tagslink.'">'.$tagname.'</a>';}/*結(jié)束*/$listtemp='其它代碼'.$tagstr.'其它代碼';

第二種方法:從phome_enewstagsdata表中提取

/* 列表頁(yè)顯示tag 開始*/$tagstr='';$tsql=$empire->query("select tagid from {$dbtbpre}enewstagsdata where id='$r[id]' and classid='$r[classid]' ");while($tr=$empire->fetch($tsql)){$tt=$empire->fetch1("select * from {$dbtbpre}enewstags where tagid=".$tr['tagid']." limit 1");if(!$tt['tagid']){continue;}else{//tagname的動(dòng)態(tài) 或 偽靜態(tài) 時(shí)的鏈接,采用以下1行代碼//$tagslink=eReturnRewriteTagsUrl(0,$tt['tagname'],1);//tagid式的動(dòng)態(tài)鏈接,采用以下1行代碼$tagslink=$public_r['newsurl'].'e/tags/?tagid='.$tt['tagid'];//采用東坡網(wǎng)靜態(tài)化插件時(shí)的tag鏈接,采用以下1行代碼//$tagslink=user_HtmlTagLink($tt['tagid']);}$tagstr.='<a title="'.$tagname.'" target="_blank" href="'.$tagslink.'">'.$tt['tagname'].'</a>';}/*結(jié)束*/$listtemp='其它代碼'.$tagstr.'其它代碼';

說明:

1、代碼中的tag鏈接都有3種方式,可以根據(jù)實(shí)際情況進(jìn)行選擇。

2、以上代碼放入列表內(nèi)容模板(list.var) ,必須開啟使用程序代碼。

責(zé)任編輯:實(shí)速科技