开发学院CMS教程风讯CMS 风讯CMS2.0子类新闻排序和图片导航显示问题 阅读

风讯CMS2.0子类新闻排序和图片导航显示问题

 2009-10-26 08:34:00 来源:WEB开发网   
核心提示:(1)子类新闻中的类目排序修改成按顺序排而不是倒序排,请找到admin/refresh/refreshFunction.asp中的大概是175行吧,风讯CMS2.0子类新闻排序和图片导航显示问题,找到ClassSql = "Select Top " & ClassNumberStr & "

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

Tags:风讯 CMS 子类

编辑录入:爽爽 [复制链接] [打 印]
[]
  • 好
  • 好的评价 如果觉得好,就请您
      0%(0)
  • 差
  • 差的评价 如果觉得差,就请您
      0%(0)
赞助商链接