风讯CMS2.0子类新闻排序和图片导航显示问题
2009-10-26 08:34:00 来源:WEB开发网(1)子类新闻中的类目排序修改成按顺序排而不是倒序排,请找到admin/refresh/refreshFunction.asp中的大概是175行吧,找到ClassSql = "Select Top " & ClassNumberStr & " * from NewsClass where ClassID in (" & AllChildClassID & ") and DelFlag=0 order by ID desc"
将其中的红色部分desc删除即可;
(2)子类新闻列表排序问题,假如要修改成按时间先后排序,请找到admin/refresh/refreshFunction.asp中的大楖230行吧,找到NewsSql = "Select top " & NewsListNumberStr & " Title,TitleStyle,Path,AddDate,HeadNewsTF,HeadNewsPath,FileName,FileExtName from News where ClassID='" & AlreadyClassObj("ClassID") & "' and AuditTF=1 and DelTF=0"
改成NewsSql = "Select top " & NewsListNumberStr & " Title,TitleStyle,Path,AddDate,HeadNewsTF,HeadNewsPath,FileName,FileExtName from News where ClassID='" & AlreadyClassObj("ClassID") & "' and AuditTF=1 and DelTF=0 order by AddDate desc"(红色部分order by AddDate desc为添加)即可!
(3)另外,子类新闻导航显示问题,假如您认为有必要,可将本人修改后的 GetOneClassNewsList函数覆盖替换掉您的admin/refresh/refreshFunction.asp文件中相应函数即可一切正常(经测试正常)
Function GetOneClassNewsList(AlreadyClassObj,NewsListNumberStr,TitleNumberStr,CompatPicStr,NaviPicStr,DateRuleStr,DateRightStr,RowHeightStr,RowNumberStr,MoreLinkTypeStr,MoreLinkContentStr,CSSStyleStr,OpenTypeStr,DateCSSStyleStr,TxtNaviStr)
Dim RsNewsObj,NewsSql,i,ClassSaveFilePath
Dim TempRowNumberStr,TempDateShowStr
if Not AlreadyClassObj.Eof then
if DateRuleStr <> "" then
if DateRightStr = "Left" then
TempRowNumberStr = "colspan=""" & RowNumberStr & """"
elseif DateRightStr = "Center" then
TempRowNumberStr = "colspan=""" & RowNumberStr * 2 & """"
elseif DateRightStr = "Right" then
TempRowNumberStr = "colspan=""" & RowNumberStr * 2 & """"
else
TempRowNumberStr = "colspan=""" & RowNumberStr & """"
end if
else
TempRowNumberStr = "colspan=""" & RowNumberStr & """"
end if
if AlreadyClassObj("SaveFilePath") = "/" then
ClassSaveFilePath = AlreadyClassObj("SaveFilePath")
else
ClassSaveFilePath = AlreadyClassObj("SaveFilePath") & "/"
end if
if OpenTypeStr = "1" then
OpenTypeStr = "target=""_blank"""
else
OpenTypeStr = ""
end if%>
更多精彩
赞助商链接