顶部菜单的两次BUG
1、顶部菜单没有和忝外部频道链接
解决方法:下载此文件到admin目录下覆盖.
下载信息 [文件大小:8.34 KB 下载次数: 次] |
点击下载文件: |
2、最近不少朋友在论坛提出,当网站不生成静态html时,路径出错,经过测试确实存在这个问题,现在解决方法告诉大家
打开 ks_cls/ks_commoncls.asp,找到函数 Public Function GetFolderPath(FolderID,FullPathFlag)
即将以下代码:
'**************************************************
'函数名: GetFolderPath
'功 能:取得目录Url
'参 数: FolderID目录的ID,FullPathFlag是否完整路径(取栏目首页与否),包括栏目首页 如 "http://www.h121.com/article/computer/photoshop/index.html"
'**************************************************
Public Function GetFolderPath(FolderID,FullPathFlag)
KSCache.name=Cstr(SiteSN & "ClassPath" &FolderID&FullPathFlag)
IF KSCache.valid and KSCache.value<>"" Then
GetFolderPath=KSCache.value
Else
Call KSCache.clean
Dim FolderSql, Folder,ClassPurview
FolderSql = "Select ID,ChannelID,TN,Folder,FolderDomain,FolderFsoIndex,ClassPurview From KS_Class Where ID='" & FolderID & "'"
Dim FolderRS:Set FolderRS=Server.CreateObject("ADODB.RECORDSET")
FolderRS.Open FolderSql, Conn, 1, 1
If Not FolderRS.EOF Then
ClassPurview=FolderRS("ClassPurview")
If Cbool(FullPathFlag) = True Then
'判断是否绑定域名
If Trim(FolderRS(4)) <> "" And CStr(FolderRS(2)) = "0" Then
IF ClassPurview=2 Or GetChannelConfig(FolderRS(1),"FsoHtmlTF")=0 Then
GetFolderPath = Trim(FolderRS(4)) & GetChannelNoHtmlUrl(FolderRS(1),FolderRS(0))
Else
GetFolderPath = Trim(FolderRS(4)) & FolderRS("FolderFsoIndex")
End If
ElseIf Trim(FolderRS(4)) <> "" Then
Folder = Trim(FolderRS(3))
Folder = Right(Mid(Folder, InStr(Folder, "/")), Len(Mid(Folder, InStr(Folder, "/"))) - 1)
IF ClassPurview=2 Or GetChannelConfig(FolderRS(1),"FsoHtmlTF")=0 Then
GetFolderPath = Trim(FolderRS(4)) & GetChannelNoHtmlUrl(FolderRS(1),FolderRS(0))
Else
GetFolderPath = Trim(FolderRS(4)) & Folder & FolderRS("FolderFsoIndex")
End If
Else
IF ClassPurview=2 Or GetChannelConfig(FolderRS(1),"FsoHtmlTF")=0 Then
GetFolderPath = GetChannelNoHtmlUrl(FolderRS(1),FolderRS(0))
Else
GetFolderPath = GetChannelDomain(FolderRS(1)) & FolderRS(3) & FolderRS("FolderFsoIndex")
End If
End If
Else
If Trim(FolderRS(4)) <> "" And CStr(FolderRS("TN")) = "0" Then
GetFolderPath = Trim(FolderRS(4))
ElseIf Trim(FolderRS(4)) <> "" Then
Folder = Trim(FolderRS(3))
Folder = Right(Mid(Folder, InStr(Folder, "/")), Len(Mid(Folder, InStr(Folder, "/"))) - 1)
GetFolderPath = Trim(FolderRS(4)) & Folder
Else
GetFolderPath = GetChannelDomain(FolderRS(1)) & FolderRS(3)
End If
End If
Else
GetFolderPath = ""
End If
FolderRS.Close:Set FolderRS = Nothing
KSCache.add GetFolderPath,dateadd("n",1000000,now)
End IF
End Function
替换成:
'**************************************************
'函数名: GetFolderPath
'功 能:取得目录Url
'参 数: FolderID目录的ID,FullPathFlag是否完整路径(取栏目首页与否),包括栏目首页 如 "http://www.h121.com/article/computer/photoshop/index.html"
'**************************************************
Public Function GetFolderPath(FolderID,FullPathFlag)
KSCache.name=Cstr(SiteSN & "ClassPath" &FolderID&FullPathFlag)
IF KSCache.valid and KSCache.value<>"" Then
GetFolderPath=KSCache.value
Else
Call KSCache.clean
Dim FolderSql, Folder,ClassPurview
FolderSql = "Select ID,ChannelID,TN,Folder,FolderDomain,FolderFsoIndex,ClassPurview From KS_Class Where ID='" & FolderID & "'"
Dim FolderRS:Set FolderRS=Server.CreateObject("ADODB.RECORDSET")
FolderRS.Open FolderSql, Conn, 1, 1
If Not FolderRS.EOF Then
ClassPurview=FolderRS("ClassPurview")
Dim ChannelFsoHtmlTF:ChannelFsoHtmlTF=GetChannelConfig(FolderRS(1),"FsoHtmlTF")
'判断根目录是否有绑定二级域名
If Trim(FolderRS(4)) <> "" And CStr(FolderRS(2)) = "0" Then
IF ClassPurview=2 Or ChannelFsoHtmlTF=0 Then
GetFolderPath= Trim(FolderRS(4))
Else
GetFolderPath= Trim(FolderRS(4))
End If
ElseIf Trim(FolderRS(4)) <> "" Then
Folder = Trim(FolderRS(3))
Folder = Right(Mid(Folder, InStr(Folder, "/")), Len(Mid(Folder, InStr(Folder, "/"))) - 1)
IF ClassPurview=2 Or ChannelFsoHtmlTF=0 Then
GetFolderPath= Trim(FolderRS(4)) & GetChannelNoHtmlUrl(FolderRS(1),FolderRS(0))
Else
GetFolderPath= Trim(FolderRS(4)) & Folder
End If
Else
IF ClassPurview=2 Or ChannelFsoHtmlTF=0 Then
GetFolderPath= GetChannelNoHtmlUrl(FolderRS(1),FolderRS(0))
Else
GetFolderPath=GetChannelDomain(CInt(FolderRS(1))) & FolderRS(3)
End If
End If
Else
GetFolderPath = ""
End If
FolderRS.Close:Set FolderRS = Nothing
KSCache.add GetFolderPath,dateadd("n",1000000,now)
End IF
End Function
保存后,重新生成顶部菜单JS即可!
[此贴子已经被作者于2007-5-30 16:42:57编辑过]