3.2.sp1實(shí)現(xiàn)通用標(biāo)簽[方法說明]_風(fēng)訊Cms教程
通用標(biāo)簽一直是大家所希望有的,前段時(shí)間,我改了幾個(gè)標(biāo)簽,實(shí)現(xiàn)通用。我本來在想能否用更簡單的方法來實(shí)現(xiàn),但是一直沒想出來,呵呵~(水平太差^_^)。就只好提供一個(gè)標(biāo)簽函數(shù)修改的方法給大家參考一下,并非所有的標(biāo)簽都可以用。修改的時(shí)候,請注重一下。
我用推薦新聞的標(biāo)簽函數(shù)做個(gè)示例:
打開\ foosun\admin\Refresh\RefreshFunction.asp 搜索:Function RecNews找到推薦新聞的標(biāo)簽函數(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 '當(dāng)標(biāo)簽所選欄目為空時(shí)
If SoonClassStr="1" then '當(dāng)選擇了包含子類時(shí)
Select Case Fun_Refresh_Type '選擇當(dāng)前所在的類別
Case "Class" '當(dāng)當(dāng)前類別為欄目的時(shí)候
EndClassIDList = "'" & Fun_Refresh_ID & "'" & AllChildClassIDStrList(Fun_Refresh_ID) 'EndClassIDList取值為當(dāng)前的欄目的欄目id加其所有子欄目的欄目id
Case "News" '當(dāng)當(dāng)前的列別為新聞頁面時(shí)
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取值為當(dāng)前新聞所在的欄目id
Case Else
EndClassIDList = "" '當(dāng)當(dāng)前類別不在所列出的類別之內(nèi)時(shí)EndClassIDList取空值
End Select
else '當(dāng)標(biāo)簽所選欄目為空,并卻不包含子類時(shí)
EndClassIDList = "'" & Fun_Refresh_ID & "'" 'EndClassIDList取值為當(dāng)前欄目的欄目id
end if
end if
if EndClassIDList <> "" then '當(dāng)EndClassIDList的值不為空的時(shí)候
- 最簡單的欄目切換方法(樣式系列之欄目切換篇2)
- 我也放個(gè)欄目切換代碼,簡簡單單的。
- 搜狐女性頻道幻燈效果(幻燈系列之flash特效篇)
- 有效控制新聞內(nèi)容的圖片的尺寸
- 現(xiàn)提供增加<目錄生成規(guī)則>的方法!
- 風(fēng)訊里面上下篇標(biāo)簽DIV模式下浮動(dòng)的解決方法!
- 風(fēng)訊目錄路徑自由選擇的實(shí)現(xiàn)方法
- 新聞列表讀取內(nèi)容時(shí)去掉html代碼
- 添加文字廣告的解決方案!
- 發(fā)些滾動(dòng)的代碼
- 標(biāo)題下的分隔線在4.0中如何設(shè)置,還有標(biāo)題的行間距
- 隨時(shí)更換模版、廣告等,無須重新生成整站,共享出來供討論
- 相關(guān)鏈接:
- 教程說明:
風(fēng)訊Cms教程-3.2.sp1實(shí)現(xiàn)通用標(biāo)簽[方法說明]
。