FoosunCMS-子类新闻排序和图片导航显示问题

来自站长百科
跳转至: 导航、​ 搜索

导航:返回上一页

FoosunCMS-子类新闻排序和图片导航显示问题

  • 子类新闻中的类目排序修改成按顺序排而不是倒序排,

请找到admin/refresh/refreshFunction.asp中的大概是175行吧,

找到

ClassSql = "Select Top " & 
ClassNumberStr & " * 
from NewsClass where ClassID in 
(" & AllChildClassID & ") 
and DelFlag=0 order by ID desc" 

将其中的红色部分desc删除即可;

  • 子类新闻列表排序问题,如果要修改成按时间先后排序,请找到admin/refresh/refreshFunction.asp中的大楖230行吧,

找到

 NewsSql= 
"Selecttop "&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为添加)

即可!

  • 另外,子类新闻导航显示问题,如果您认为有必要,可将本人修改后的 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%>


参考来源[ ]