账号通
    

账号  

密码  

11758

查看

24

回复
主题:[分享]3.2顶部菜单生成路径出错的解决方法(5-29) [收藏主题] 本贴被认定为精华 转到:  
科汛官方 当前离线

47268

主题

145

广播

405

粉丝
添加关注
级别:管理员

用户积分:101604 分
登录次数:7935 次
注册时间:2006/12/7
最后登录:2023/12/14
科汛官方 发表于:2007/5/25 10:30:00   | 显示全部帖子 查看该作者主题 楼主 
做在线知识付费 选科汛云开店

顶部菜单的两次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编辑过]

 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
科汛官方 当前离线

47268

主题

145

广播

405

粉丝
添加关注
级别:管理员

用户积分:101604 分
登录次数:7935 次
注册时间:2006/12/7
最后登录:2023/12/14
科汛官方 发表于:2007/5/30 16:43:00   | 显示全部帖子 查看该作者主题 沙发 
做在线知识付费 选科汛云开店
已更新,请重新下载!
 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
<上一主题 | 下一主题 >
Powered By KesionCMS Version X1
厦门科汛软件有限公司 © 2006-2016 页面执行0.07422秒 powered by KesionCMS 9.0