自己扩展的风讯3.1的幻灯片_风讯Cms教程
打开 admin/refresh/refreshfunction.asp 添加以下代码到结尾处(注重要在 %> 之前哦)
'## Flash 幻灯片 ################################################
Function FilterNewsEx(ClassListStr,NewsNumberStr,TitleNumberStr,CssFileStr,PicWidthStr,PicHeightStr,OpenModeStr,ShowTitleStr,RowSpaceStr)
Dim FilterSql,RsFilterObj,FilterStr,ImagesStr,TxtStr,TxtFirst,ClassSaveFilePath,LinkStr
TitleNumberStr = GetTitleNumberStr(TitleNumberStr)
if ClassListStr <> "" then
FilterSql = "Select Top " & NewsNumberStr & " *,FS_NewsClass.FileExtName as ClassFileExtName,FS_News.FileExtName as NewsFileExtName from FS_News,FS_NewsClass where FS_News.Classid=FS_NewsClass.Classid and FS_News.DelTF=0 and FS_News.FilterNews=1 and FS_News.AuditTF=1 and FS_NewsClass.ClassEName='" & ClassListStr & "' order by FS_News.ID Desc"
else
FilterSql = "Select Top " & NewsNumberStr & " *,FS_NewsClass.FileExtName as ClassFileExtName,FS_News.FileExtName as NewsFileExtName from FS_News,FS_NewsClass where FS_News.Classid=FS_NewsClass.Classid and FS_News.DelTF=0 and FS_News.FilterNews=1 and FS_News.AuditTF=1 order by FS_News.ID Desc"
end if
Set RsFilterObj = Conn.Execute(FilterSql)
TxtFirst=""
if not RsFilterObj.Eof then
Dim Temp_Num
Temp_Num = 0
Do While Not RsFilterObj.Eof
Temp_Num = Temp_Num 1
RsFilterObj.MoveNext
Loop
RsFilterObj.MoveFirst
If Temp_Num <=1 then
Set RsFilterObj = Nothing
FilterNews = "至少需要两条幻灯新闻才能正确显示幻灯效果"
Set RsFilterObj = Nothing
Exit Function
End If
do while Not RsFilterObj.Eof
if RsFilterObj("SaveFilePath") = "/" then
ClassSaveFilePath = RsFilterObj("SaveFilePath")
else
ClassSaveFilePath = RsFilterObj("SaveFilePath") & "/"
end if
if (Not IsNull(RsFilterObj("PicPath"))) And (RsFilterObj("PicPath") <> "") then
if ImagesStr = "" then
If Instr(1,LCase(RsFilterObj("PicPath")),"http://") <> 0 then
ImagesStr = RsFilterObj("PicPath")
Else
ImagesStr = AvailableDoMain & RsFilterObj("PicPath")
End If
TxtStr = GotTopic(RsFilterObj("title"),TitleNumberStr)
TxtFirst = GetOneNewsLinkURL(RsFilterObj("NewsID"))
LinkStr = GetOneNewsLinkURL(RsFilterObj("NewsID"))
else
If Instr(1,LCase(RsFilterObj("PicPath")),"http://") <> 0 then
ImagesStr = ImagesStr &"|"& RsFilterObj("PicPath")
Else
ImagesStr = ImagesStr &"|"& AvailableDoMain & RsFilterObj("PicPath")
End If
TxtStr = TxtStr & "|" & GotTopic(RsFilterObj("title"),TitleNumberStr)
LinkStr = LinkStr & "|" & GetOneNewsLinkURL(RsFilterObj("NewsID"))
end if
end if
RsFilterObj.MoveNext
loop
FilterStr = "
FilterStr = FilterStr & "var focus_width="& PicWidthStr &";" & vbcrlf
- 相关链接:
- 教程说明:
风讯Cms教程-自己扩展的风讯3.1的幻灯片。