日韩天天综合网_野战两个奶头被亲到高潮_亚洲日韩欧美精品综合_av女人天堂污污污_视频一区**字幕无弹窗_国产亚洲欧美小视频_国内性爱精品在线免费视频_国产一级电影在线播放_日韩欧美内地福利_亚洲一二三不卡片区

動(dòng)易CMS如何實(shí)現(xiàn)“頂”排行_動(dòng)易Cms教程

編輯Tag賺U幣
教程Tag:暫無(wú)Tag,歡迎添加,賺取U幣!

SiteWeaver6.6加入了頂功能,有些用戶想頂之后查看文章的時(shí)候顯示的是頂?shù)淖疃嗟奈恼拢@個(gè)可以用一個(gè)自定義標(biāo)簽來(lái)實(shí)現(xiàn),下面說一下實(shí)現(xiàn)的步驟。

 

 

自定義標(biāo)簽定義如下。

 

標(biāo)簽名:{$MY_頂排行(參數(shù)列表)}

參數(shù):

Num 顯示“頂”排行的個(gè)數(shù)
ChannelID 頻道ID,0為不限制,如需取多個(gè)頻道請(qǐng)用逗號(hào)隔開,中括號(hào)括起,比如[1,2,3]
ClassID 欄目ID,0為不限制,如需取多個(gè)頻道請(qǐng)用逗號(hào)隔開,中括號(hào)括起,比如[1,2,3]
TitleLen 標(biāo)題長(zhǎng)度
ContentLen 內(nèi)容長(zhǎng)度
ShowContnet 是否顯示內(nèi)容,True為顯示,F(xiàn)alse為不顯示
ShowOthers 是否顯示加入收藏,推薦給好友等內(nèi)容,True為顯示,F(xiàn)alse為不顯示

sql語(yǔ)句:

access數(shù)據(jù)庫(kù):

select top {input(0)} * from PE_Article where status=3 and Deleted = {$PE_False} and MY_upart<>'' and ChannelID in ({input(1)}) and ClassID in ({input(2)}) Order by cint(MY_upart) desc

Sql數(shù)據(jù)庫(kù):

select top {input(0)} * from PE_Article where status=3 and Deleted = {$PE_False} and MY_upart<>'' and ChannelID in ({input(1)}) and ClassID in ({input(2)}) Order by convert(int,MY_upart) desc

注:自定義字段暫時(shí)沒有整數(shù)型的,所以排序的時(shí)候需要轉(zhuǎn)化為數(shù)字型,如果您發(fā)現(xiàn)更好的方法,請(qǐng)跟帖說明。

標(biāo)簽內(nèi)容:

<table style="BORDER-RIGHT: #cccccc 1px solid; BORDER-TOP: #cccccc 1px solid; BORDER-LEFT: #cccccc 1px solid; BORDER-BOTTOM: #cccccc 1px solid;">
<tr>
<td>{Loop}{Infobegin}
<table width=100%>
<tr>
<td width=80 style="border-bottom: 1px dashed #ccc;"><IFRAME style="MARGIN-LEFT: 15px" src="{$InstallDir}ding.asp?articleid={$Field(0,Text,0,0,0)}" frameBorder=0 width=60 scrolling=no height=70></IFRAME></td>
<td style="border-bottom: 1px dashed #ccc;">
<table width=100%>
<tr>
<td style="FONT-SIZE: 10pt; text-align: left;"><A href="{$InstallDir}{$Field(0,GetUrl,Article,1)}"><STRONG>{$Field(3,Text,{input(3)},0,0)}</STRONG></A></td>
</tr>
{$YN({input(5)},<tr><td>{$Field(19,Text,{input(4)},2,0)} <A href="{$InstallDir}{$Field(0,GetUrl,Article,1)}">>>詳細(xì)</A> </td></tr>,)}
{$YN({input(6)},<tr><td><IMG src="{$InstallDir}images/Special_List7.gif" border=0><A href="{$InstallDir}User/User_Favorite.asp?Action=Add&ChannelID={$Field(1,Text,0,0,0)}&InfoID={$Field(0,Text,0,0,0)}">加入收藏</A> <IMG src="{$InstallDir}images/Special_List7.gif" border=0><A href="{$InstallDir}{$Field(1,GetChannel,1)}/SendMail.asp?ArticleID={$Field(0,Text,0,0,0)}" target=_self>推薦給朋友</A></td></tr>,)}
</table>
</td>
</tr>

</table>
{Infoend}{/Loop} </td>
</tr> </table>

--------------

效果圖

 

 

 

 

查看更多 動(dòng)易Cms教程  動(dòng)易Cms模板

來(lái)源:模板無(wú)憂//所屬分類:動(dòng)易Cms教程/更新時(shí)間:2012-05-17
相關(guān)動(dòng)易Cms教程