首页 > 网站 > 建站经验 > 正文

3.0SP2-显示同级栏目修改方法

2024-08-30 19:06:09
字体:
来源:转载
供稿:网友

适用系统:3.0SP2,其它系统应该类似
实现思想:在最终文章列表页显示同级的其它分类
修改文件:/Admin/Refresh/RefreshFunction.asp
/Admin/Refresh/SelectFunction.asp
/Editer/LableEditer.asp
添加文件:/FunPages/LableClassNavi_last.asp
/Images/Lable/Navi2.gif

实现方法(共四步):
第一步、打开/Admin/Refresh/RefreshFunction.asp文件
查找“Function HotNews(”,在其上面添加以下代码:

'终级栏目导航-Kimli添加
Function ClassNavi_Last(NaviPicStr,CompatPicStr,RowNumberStr,OpenTypeStr,CSSStyleStr,TxtNaviStr)
Dim ClassSql,RsClassObj,i
if RefreshType = "Class" then
CompatPicStr = GetCompatPicStr(CompatPicStr,"","",RowNumberStr)
OpenTypeStr = GetOpenTypeStr(OpenTypeStr)
NaviPicStr = GetNewsNavitionStr(TxtNaviStr,NaviPicStr)
ClassSql = "Select ParentID from NewsClass where ShowTF=1 and DelFlag=0 and ClassID='" & RefreshID & "' order by orders asc"
Set RsClassObj = Conn.Execute(ClassSql)
If Not RsClassObj.Eof Then ThisParentID=RsClassObj("ParentID")
Set RsClassObj = Nothing
ClassSql = "Select SaveFilePath,ClassEName,ClassCName,FileExtName from NewsClass where ShowTF=1 and DelFlag=0 and ParentID='" & ThisParentID & "' order by orders asc"
Set RsClassObj = Conn.Execute(ClassSql)
ClassNavi_Last = " " & Chr(13) & Chr(10)
do while Not RsClassObj.Eof
ClassNavi_Last = ClassNavi_Last & " " & Chr(13) & Chr(10)
for i = 1 to RowNumberStr
ClassNavi_Last = ClassNavi_Last & " " & NaviPicStr & " " & RsClassObj("ClassCName") & "" & Chr(13) & Chr(10)
RsClassObj.MoveNext
if RsClassObj.Eof then Exit For
Next
ClassNavi_Last = ClassNavi_Last & "" & Chr(13) & Chr(10)& CompatPicStr & Chr(13) & Chr(10)
loop
ClassNavi_Last = ClassNavi_Last & "" & Chr(13) & Chr(10)
Set RsClassObj = Nothing
else
ClassNavi_Last = ""
end if
End Function
'终级栏目导航-Kimli添加结束

第二步:打开/Admin/Refresh/SelectFunction.asp文件
查找“Case "hotnews"
在其上面一行添加:

'终极分类-Kimli添加
Case "classnavi_last"
if UBound(ParaArray) = 6 then
GetLableContent = ClassNavi_last(ParaArray(1),ParaArray(2),ParaArray(3),ParaArray(4),ParaArray(5),ParaArray(6))
else
GetLableContent = ""
Exit Function
end if
'END9 7 3 1
共2页上一页12下一页
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表