3.2.sp1實現(xiàn)通用標簽[方法說明]_風訊Cms教程

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

      通用標簽一直是大家所希望有的,前段時間,我改了幾個標簽,實現(xiàn)通用。我本來在想能否用更簡單的方法來實現(xiàn),但是一直沒想出來,呵呵~(水平太差^_^)。就只好提供一個標簽函數(shù)修改的方法給大家參考一下,并非所有的標簽都可以用。修改的時候,請注重一下。

      我用推薦新聞的標簽函數(shù)做個示例:

      打開\ foosun\admin\Refresh\RefreshFunction.asp 搜索:Function RecNews找到推薦新聞的標簽函數(shù):

      Function RecNews(ClassEName,SoonClassStr,NewNumberStr,TitleNumberStr,RowNumberStr,NaviPicStr,CompatPicStr,OpenTypeStr,CSSStyleStr,RowHeightStr,TxtNaviStr)
      Dim RecNewsSql,RsRecNewsObj,i
      TitleNumberStr = GetTitleNumberStr(TitleNumberStr)
      OpenTypeStr = GetOpenTypeStr(OpenTypeStr)
      CompatPicStr = GetCompatPicStr(CompatPicStr,"","",RowNumberStr)
      NaviPicStr = GetNewsNavitionStr(TxtNaviStr,NaviPicStr)
      if RowHeightStr <> "" then RowHeightStr = " Height=""" & RowHeightStr & """"
      '-------------
      dim TemppID,TemppSql,EndClassIDList
      If ClassEName<>"" then
      If SoonClassStr="1" then
      TemppSql="select ClassID from FS_NewsClass where ClassEName='" & ClassEName & "'"
      Set TemppID=conn.execute(TemppSql)
      EndClassIDList= "'" & TemppID(0) & "'" & AllChildClassIDStrList(TemppID(0))
      Else
      TemppSql="select ClassID from FS_NewsClass where ClassEName='" & ClassEName & "'"
      Set TemppID=conn.execute(TemppSql)
      EndClassIDList="'" & TemppID(0) & "'"
      End if
      Else '當標簽所選欄目為空時
      If SoonClassStr="1" then '當選擇了包含子類時
      Select Case Fun_Refresh_Type '選擇當前所在的類別
      Case "Class" '當當前類別為欄目的時候
      EndClassIDList = "'" & Fun_Refresh_ID & "'" & AllChildClassIDStrList(Fun_Refresh_ID) 'EndClassIDList取值為當前的欄目的欄目id加其所有子欄目的欄目id
      Case "News" '當當前的列別為新聞頁面時
      dim temp1rs,temp1sql,temp1id
      temp1sql = "select classid from fs_news where newsid = '" & Fun_Refresh_ID & "'"
      set temp1rs = conn.execute(temp1sql)
      if not temp1rs.eof then
      temp1id = temp1rs("classid")
      end if
      EndClassIDList = "'" & temp1id & "'" 'EndClassIDList取值為當前新聞所在的欄目id
      Case Else
      EndClassIDList = "" '當當前類別不在所列出的類別之內時EndClassIDList取空值
      End Select
      else '當標簽所選欄目為空,并卻不包含子類時
      EndClassIDList = "'" & Fun_Refresh_ID & "'" 'EndClassIDList取值為當前欄目的欄目id
      end if
      end if
      if EndClassIDList <> "" then '當EndClassIDList的值不為空的時候

      查看更多 風訊cms教程  風訊cms模板

      共2頁上一頁12下一頁
      來源:模板無憂//所屬分類:風訊Cms教程/更新時間:2006-06-17
      相關風訊Cms教程