国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > CMS > 動易CMS > 正文

怎樣實(shí)現(xiàn)“頂”排行

2024-09-10 21:56:18
字體:
供稿:網(wǎng)友

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

 

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

 

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

參數(shù):

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

sql語句:

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

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ù)庫:

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)更好的方法,請跟帖說明。

標(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>

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

效果圖

 

發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表

圖片精選

主站蜘蛛池模板: 宁蒗| 苏尼特左旗| 普陀区| 区。| 盐源县| 来安县| 贡山| 崇明县| 浦城县| 深圳市| 襄樊市| 陈巴尔虎旗| 呈贡县| 宁陵县| 黄梅县| 囊谦县| 南京市| 栾川县| 海晏县| 庆阳市| 昭觉县| 大关县| 西城区| 井陉县| 平遥县| 大悟县| 河间市| 赤城县| 罗甸县| 讷河市| 长春市| 巫山县| 黄平县| 沙田区| 乌苏市| 荔波县| 乾安县| 定安县| 称多县| 吉林省| 秭归县|