账号通
    

账号  

密码  

2058

查看

3

回复
主题:使用中的一些bug修正及技巧 [收藏主题] 转到:  
xiairy 当前离线

34

主题

0

广播

0

粉丝
添加关注
级别:学前班

用户积分:553 分
登录次数:25 次
注册时间:2007/8/10
最后登录:2008/4/3
xiairy 发表于:2007/10/8 23:55:00   | 只看该作者 查看该作者主题 楼主 
科汛在线考试系统(NET)

1、采集时自动将有图片的文章设置为图文类型(技巧)

将Admin\Collect\Collect_ItemCollecFast.asp文件的第830行后面加上以下一句

RS("TitleType")="[图文]"

修改时搜索If PicNews=1 And DefaultPicUrl<>"" Then,将

If PicNews=1 And DefaultPicUrl<>"" Then
       Rs("PicUrl")=DefaultPicUrl
       Rs("PicNews")=1
Else

改为

If PicNews=1 And DefaultPicUrl<>"" Then
       Rs("PicUrl")=DefaultPicUrl
       Rs("PicNews")=1
       RS("TitleType")="[图文]"
Else

2、采集时选择不保存图片时前台不能正确显示图片。(技巧)

以下是引用xiairy在2007-10-8 23:03:15的发言:

采集文章时如果不采集图片的话,文章显示时不能正常显示,显示的是本地路径而不是采集页面的路径。我发现了问题,但不懂正则表达式,没法修改,但通过把以下语句注释掉后也解决了问题,不知道大家有没有这个问题。

ks.rcls.asp的1785行注释掉,即把下面一条注释掉即解释问题

Content=re.replace(Content,"<img src=$2  style=""cursor: pointer"" alt=""点此在新窗口浏览图片"" onclick=""javascript:window.open(this.src);"" onmousewheel=""return bbimg(this)"" onload=""javascript:resizepic(this)"" border=""0""/>")

也许问题并不在上一名语句,应该是1783行的re.Pattern="<img.[^>]*src(=| )(.[^>]*)>"

但我不会改,所以只把上面那条注释掉了,不过效果也达到了

3、修改后台路径后SK采集不能正确使用(技巧)。

以下是引用燕杀风在2007-10-8 23:08:39的发言:

修改了后台的管理路径后,比如将admin修改为adminabc,且在后台将路径设置好,登陆都没有问题,但是将导致采集插件无法使用。

请管理员测试一下。

采集存在该问题,但不是系统内置采集插件有问题,而是SK采集有问题。

解决方法用DW查找替换,选择Plus\SK_Cj目录替换整个目录里面的文件的源码,将"admin/"替换为"你所改成的目录"

4、关于文章列表控制里面分隔图片格式控制的一点小错误(bug)

在标签调用时文章列表标签里面如果用了分隔线的话,输出的页面里面多一个双引号,有时显示不正确,显示结果如下:

<tr><td Height="1" colspan="2"" background="/Upfiles/Line4.gif"></td></tr>

更正方法:

将KS_Cls下的KS.PublicCls.asp文件里面的1266,1267行

     If ColSpanNum>=2 Then ColStr=" colspan=""" & ColSpanNum & """"
      GetSplitPic = "<tr><td Height=""1"""  & ColStr & """ background=""" & SplitPic & """ ></td></tr>" & vbcrlf

替换为以下:

    if ColSpanNum>=2 Then ColStr=" colspan="""& ColSpanNum&""""
    GetSplitPic = "<tr><td Height=""1"""  & ColStr & " background=""" & SplitPic & """></td></tr>" & vbcrlf

小小的发现,希望对大家科汛有用。

5、关于”图片文章列表“里面输出格式控制里面多了一个双引号经常导致显示混乱的一点小错误(bug)

问题同上面第四,即显示图片文章列表时多了一个双引号(页面显示<a href="XXXXX" target="blank""> ),经常导致页面不显示text,而是显示html标记。

修改方法:

ks_cls/KS.LabelCls.asp的第677行(大概,我的被我修改过,行号不一定对),

<a href=""" & Url  & """" & O_T_S & """>全文改为<a href=""" & Url  & """" & O_T_S & ">全文,即将>全文前的三个引号改为一个

其他错误和技巧正在收集中,大家发现错误都发上来一起研究。希望对官方和各位使用的朋友有用。

6、

以下是引用nianjin在2007-10-10 16:41:20的发言:

打开ks.LabelCls.asp


查找265行 函数名:KS_Rolls 到   423行'取得连续滚动图片换成以下代码就行了。。。


 '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  '函数名:KS_Rolls
  '作 用: 通用连续图片滚动函数
  '参 数: ChannelID模块ID,SqlStr 待查询的SQL语句等
  '++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 Function KS_Rolls(ChannelID,SqlStr,M_Dir, M_Width, M_Height, OpenType, ShowTitle, Width, Height, M_Speed, T_Len, T_Css, BorderType, Border)
          Dim ImgStr, TempPicStr, T_CssStr,Title, TempTitleStr, O_T_S,Url,TID
    Dim SQL,K,RS:Set RS=Conn.Execute(SqlStr)
    If RS.EOF Then  KS_Rolls="":RS.Close:Set RS=Nothing:Exit Function
    SQL=RS.GetRows(-1):RS.Close:Set RS = Nothing

    T_CssStr = KS.GetCss(T_Css):O_T_S = KS.G_O_T_S(OpenType)
    If LCase(M_Dir) = "left" Or LCase(M_Dir) = "right" Then
         ImgStr = "<table width=""100%"" height=""100%"" border=""0"">" & vbCrLf
         ImgStr = ImgStr & "<tr>" & vbCrLf
        For K=0 To Ubound(SQL,2)
           TID = SQL(2,K)
        Title = SQL(1,K)
        TempPicStr=GetPicUrl(SQL(7,K))
        Url=KS.GetInfoUrl(ChannelID,SQL(2,K),SQL(0,K),SQL(5,K),SQL(3,K),SQL(4,K),SQL(6,K))

        '-------------------------给图片加边框开始-------------------------------------------------
        Dim TempBorder
        If BorderType = 1 And Border <> "" Then
          TempBorder = TempPicStr    '得到原图片
          TempPicStr = Border        '将原图片设定为透明边框
        Else
          TempBorder = Border:TempPicStr = TempPicStr
        End If
       
        Dim LinkAndPicStr: LinkAndPicStr = "<a href=""" & Url & """" & O_T_S & " title=""" & Title & """><Img Src=""" & TempPicStr & """ border=""0"" width=""" & Width & """ height=""" & Height & """ align=""absmiddle""/></a>"
        TempPicStr = KS.GetPhotoBorder(LinkAndPicStr, BorderType, TempBorder)
        '-----------------------给图片加边框结束--------------------------------------------------
        TempTitleStr = "<a" & T_CssStr & " href=""" & Url & """" & O_T_S & " title=""" & Title & """>" & KS.GotTopic(Title, T_Len) & "</a>"
    
        ImgStr = ImgStr & "<td>" & vbCrLf
        ImgStr = ImgStr & "<table boder=""0"" width=""100%"" height=""100%"">" & vbCrLf
        ImgStr = ImgStr & "<tr><td align=""center"">" & TempPicStr & "</td></tr>" & vbCrLf
       If Cbool(ShowTitle) = True Then
        ImgStr = ImgStr & "<tr><td align=""center"">" & TempTitleStr & " </td></tr>" & vbCrLf
       End If
        ImgStr = ImgStr & "</table>" & vbCrLf
        ImgStr = ImgStr & "</td>" & vbCrLf
        Next
         ImgStr = ImgStr & "</tr></table>" & vbCrLf
    Else
      ImgStr = "<table width=""100%"" height=""100%"" border=""0"">" & vbCrLf
      For K=0 To Ubound(SQL,2)
        Title = SQL(1,K)
        TempPicStr=GetPicUrl(SQL(7,K))
        Url=KS.GetInfoUrl(ChannelID,SQL(2,K),SQL(0,K),SQL(5,K),SQL(3,K),SQL(4,K),SQL(6,K))
        '-------------------------给图片加边框开始-------------------------------------------------
        If BorderType = 1 And Border <> "" Then
          TempBorder = TempPicStr    '得到原图片
          TempPicStr = Border        '将原图片设定为透明边框
        Else
          TempBorder = Border
          TempPicStr = TempPicStr
        End If
        LinkAndPicStr = "<a href=""" & URL & """" & O_T_S & " title=""" & Title & """><Img Src=""" & TempPicStr & """ border=""0"" width=""" & Width & """ height=""" & Height & """ align=""absmiddle""/></a>"
        TempPicStr = KS.GetPhotoBorder(LinkAndPicStr, BorderType, TempBorder)
        '-----------------------给图片加边框结束--------------------------------------------------
        TempTitleStr = "<a" & T_CssStr & " href=""" & URL & """" & O_T_S & " title=""" & Title & """>" & KS.GotTopic(Title, T_Len) & "</a>"
    
       ImgStr = ImgStr & "<tr><td>" & vbCrLf
       ImgStr = ImgStr & "<table boder=""0"" width=""100%"" height=""100%"">" & vbCrLf
       ImgStr = ImgStr & "<tr><td align=""center"">" & TempPicStr & "</td></tr>" & vbCrLf
         If Cbool(ShowTitle) = True Then ImgStr = ImgStr & "<tr><td align=""center"">" & TempTitleStr & " </td></tr>" & vbCrLf
       ImgStr = ImgStr & "</table>" & vbCrLf
       ImgStr = ImgStr & "</td></tr>" & vbCrLf
            Next
       ImgStr = ImgStr & "</table>" & vbCrLf
      End If
     Select Case M_Dir
      Case "up"
        KS_Rolls = KS_Rolls & "<div id=demoup"& TID &" style=""overflow:hidden; width:" & M_Width & "px; height:" & M_Height & "px;"" > " & vbCrLf
        KS_Rolls = KS_Rolls & "<div id=demoup"& TID &"1>" & vbCrLf
        KS_Rolls = KS_Rolls & ImgStr
        KS_Rolls = KS_Rolls & "</div>" & vbCrLf
        KS_Rolls = KS_Rolls & "<div id=demoup"& TID &"2></div>" & vbCrLf
        KS_Rolls = KS_Rolls & "</div>" & vbCrLf
        KS_Rolls = KS_Rolls & "<script language=""javascript"">" & vbCrLf
        KS_Rolls = KS_Rolls & " var upspeed"& TID &" = " & M_Speed & ";" & vbCrLf
        KS_Rolls = KS_Rolls & " demoup"& TID &"2.innerHTML = demoup"& TID &"1.innerHTML;" & vbCrLf
        KS_Rolls = KS_Rolls & " function MarqueeUP"& TID &"(){" & vbCrLf
        KS_Rolls = KS_Rolls & " if(demoup"& TID &"2.offsetTop-demoup"& TID &".scrollTop<=0)" & vbCrLf
        KS_Rolls = KS_Rolls & " demoup"& TID &".scrollTop-=demoup"& TID &"1.offsetHeight" & vbCrLf
        KS_Rolls = KS_Rolls & " else{" & vbCrLf
        KS_Rolls = KS_Rolls & " demoup"& TID &".scrollTop++" & vbCrLf
        KS_Rolls = KS_Rolls & "}" & vbCrLf
        KS_Rolls = KS_Rolls & "}" & vbCrLf
        KS_Rolls = KS_Rolls & "var MyMarUP"& TID &" = setInterval(MarqueeUP"& TID &", upspeed"& TID &")" & vbCrLf
        KS_Rolls = KS_Rolls & "demoup"& TID &".onmouseover=function() {clearInterval(MyMarUP"& TID &")}" & vbCrLf
        KS_Rolls = KS_Rolls & "demoup"& TID &".onmouseout=function() {MyMarUP"& TID &"=setInterval(MarqueeUP"& TID &",upspeed"& TID &")}" & vbCrLf
        KS_Rolls = KS_Rolls & "</script>" & vbCrLf
      Case "down"
        KS_Rolls = KS_Rolls & "<div id=demodown"& TID &" style=""overflow:hidden; width:" & M_Width & "px; height:" & M_Height & "px;"">" & vbCrLf
        KS_Rolls = KS_Rolls & "<div id=demodown"& TID &"1>" & vbCrLf
        KS_Rolls = KS_Rolls & ImgStr
        KS_Rolls = KS_Rolls & "</div>" & vbCrLf
        KS_Rolls = KS_Rolls & "<div id=demodown"& TID &"2></div>" & vbCrLf
        KS_Rolls = KS_Rolls & "</div>" & vbCrLf
        KS_Rolls = KS_Rolls & "<script language=""javascript"">" & vbCrLf
        KS_Rolls = KS_Rolls & "var downspeed"& TID &" = " & M_Speed & ";" & vbCrLf
        KS_Rolls = KS_Rolls & "demodown"& TID &"2.innerHTML = demodown"& TID &"1.innerHTML;" & vbCrLf
        KS_Rolls = KS_Rolls & "demodown"& TID &".scrollTop = demodown"& TID &".scrollHeight" & vbCrLf
        KS_Rolls = KS_Rolls & "function MarqueeDown"& TID &"(){" & vbCrLf
        KS_Rolls = KS_Rolls & "if(demodown"& TID &"1.offsetTop-demodown"& TID &".scrollTop>=0)" & vbCrLf
        KS_Rolls = KS_Rolls & "demodown"& TID &".scrollTop+=demodown"& TID &"2.offsetHeight" & vbCrLf
        KS_Rolls = KS_Rolls & "else{" & vbCrLf
        KS_Rolls = KS_Rolls & "demodown"& TID &".scrollTop--" & vbCrLf
        KS_Rolls = KS_Rolls & "}}" & vbCrLf
        KS_Rolls = KS_Rolls & "var MyMardown"& TID &" = setInterval(MarqueeDown"& TID &", downspeed"& TID &")" & vbCrLf
        KS_Rolls = KS_Rolls & "demodown"& TID &".onmouseover=function() {clearInterval(MyMardown"& TID &")}" & vbCrLf
        KS_Rolls = KS_Rolls & "demodown"& TID &".onmouseout=function() {MyMardown"& TID &"=setInterval(MarqueeDown"& TID &",downspeed"& TID &")}" & vbCrLf
        KS_Rolls = KS_Rolls & "</script>" & vbCrLf
      Case "left"
        KS_Rolls = KS_Rolls & "<div id=demoleft"& TID &" style=""overflow:hidden;height:" & M_Height & "px;width:" & M_Width & "px;"">" & vbCrLf
        KS_Rolls = KS_Rolls & "<table align=left cellpadding=0 cellspace=0 border=0>" & vbCrLf
        KS_Rolls = KS_Rolls & "<tr><td id=demoleft"& TID &"1 valign=top>" & vbCrLf
        KS_Rolls = KS_Rolls & ImgStr
        KS_Rolls = KS_Rolls & "</td>" & vbCrLf
        KS_Rolls = KS_Rolls & "<td id=demoleft"& TID &"2 valign=top></td>" & vbCrLf
        KS_Rolls = KS_Rolls & "</tr></table>" & vbCrLf
        KS_Rolls = KS_Rolls & "</div>" & vbCrLf
        KS_Rolls = KS_Rolls & "<script laguage=""javascript"">" & vbCrLf
        KS_Rolls = KS_Rolls & "var leftspeed"& TID &" = " & M_Speed & ";" & vbCrLf
        KS_Rolls = KS_Rolls & "demoleft"& TID &"2.innerHTML = demoleft"& TID &"1.innerHTML" & vbCrLf
        KS_Rolls = KS_Rolls & "function MarqueeLeft"& TID &"(){" & vbCrLf
        KS_Rolls = KS_Rolls & "if(demoleft"& TID &"2.offsetWidth-demoleft"& TID &".scrollLeft<=0)" & vbCrLf
        KS_Rolls = KS_Rolls & "demoleft"& TID &".scrollLeft-=demoleft"& TID &"1.offsetWidth" & vbCrLf
        KS_Rolls = KS_Rolls & "else{" & vbCrLf
        KS_Rolls = KS_Rolls & "demoleft"& TID &".scrollLeft++" & vbCrLf
        KS_Rolls = KS_Rolls & "}}" & vbCrLf
        KS_Rolls = KS_Rolls & "var MyMarleft"& TID &" = setInterval(MarqueeLeft"& TID &", leftspeed"& TID &")" & vbCrLf
        KS_Rolls = KS_Rolls & "demoleft"& TID &".onmouseover=function() {clearInterval(MyMarleft"& TID &")}" & vbCrLf
        KS_Rolls = KS_Rolls & "demoleft"& TID &".onmouseout=function() {MyMarleft"& TID &"=setInterval(MarqueeLeft"& TID &",leftspeed"& TID &")}" & vbCrLf
        KS_Rolls = KS_Rolls & "</script>" & vbCrLf
      Case "right"
        KS_Rolls = KS_Rolls & "<div id=demoright"& TID &" style=""overflow:hidden;height:" & M_Height & "px;width:" & M_Width & "px;"">" & vbCrLf
        KS_Rolls = KS_Rolls & "<table align=left cellpadding=0 cellspace=0 border=0><tr><td id=demoright"& TID &"1 valign=top>" & vbCrLf
        KS_Rolls = KS_Rolls & ImgStr
        KS_Rolls = KS_Rolls & "</td><td id=demoright"& TID &"2 valign=top></td></tr></table></div>" & vbCrLf
        KS_Rolls = KS_Rolls & "<script>" & vbCrLf
        KS_Rolls = KS_Rolls & "var rightspeed"& TID &" = " & M_Speed & ";" & vbCrLf
        KS_Rolls = KS_Rolls & "demoright"& TID &"2.innerHTML = demoright"& TID &"1.innerHTML;" & vbCrLf
        KS_Rolls = KS_Rolls & "demoright"& TID &".scrollLeft = demoright"& TID &".scrollWidth;" & vbCrLf
        KS_Rolls = KS_Rolls & "function MarqueeRight"& TID &"(){" & vbCrLf
        KS_Rolls = KS_Rolls & "if(demoright"& TID &".scrollLeft<=0)" & vbCrLf
        KS_Rolls = KS_Rolls & "demoright"& TID &".scrollLeft+=demoright"& TID &"2.offsetWidth" & vbCrLf
        KS_Rolls = KS_Rolls & "else{" & vbCrLf
        KS_Rolls = KS_Rolls & "demoright"& TID &".scrollLeft--" & vbCrLf
        KS_Rolls = KS_Rolls & "}}" & vbCrLf
        KS_Rolls = KS_Rolls & "var MyMarRight"& TID &" = setInterval(MarqueeRight"& TID &", rightspeed"& TID &")" & vbCrLf
        KS_Rolls = KS_Rolls & "demoright"& TID &".onmouseover=function() {clearInterval(MyMarRight"& TID &")}" & vbCrLf
        KS_Rolls = KS_Rolls & "demoright"& TID &".onmouseout=function() {MyMarRight"& TID &"=setInterval(MarqueeRight"& TID &",rightspeed"& TID &")}" & vbCrLf
        KS_Rolls = KS_Rolls & "</script>" & vbCrLf
      End Select
  End Function
  '取得连续滚动图片


[此贴子已经被作者于2007-10-12 17:56:08编辑过]

 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
goon2005 当前离线

740

主题

1

广播

0

粉丝
添加关注
级别:六年级

用户积分:3504 分
登录次数:229 次
注册时间:2006/10/31
最后登录:2018/2/26
goon2005 发表于:2007/10/9 9:54:00   | 只看该作者 查看该作者主题 沙发 
做在线知识付费 选科汛云开店
 看来要研究一下代码
 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
zhenfengdz 当前离线

3821

主题

0

广播

1

粉丝
添加关注
级别:大三

用户积分:21733 分
登录次数:436 次
注册时间:2007/1/9
最后登录:2013/4/24
zhenfengdz 发表于:2007/10/9 8:05:00   | 只看该作者 查看该作者主题 藤椅 
 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
xiairy 当前离线

34

主题

0

广播

0

粉丝
添加关注
级别:学前班

用户积分:553 分
登录次数:25 次
注册时间:2007/8/10
最后登录:2008/4/3
xiairy 发表于:2007/10/9   | 只看该作者 查看该作者主题 板凳 
科汛在线考试系统(NET)

2、引自一个网友提出的问题

以下是引用燕杀风在2007-10-8 23:08:39的发言:

修改了后台的管理路径后,比如将admin修改为adminabc,且在后台将路径设置好,登陆都没有问题,但是将导致采集插件无法使用。

请管理员测试一下。

采集存在该问题,但不是系统内置采集插件有问题,而是SK采集有问题。

解决方法用DW查找替换,选择Plus\SK_Cj目录替换整个目录里面的文件的源码,将"admin/"替换为"你所改成的目录"


[此贴子已经被作者于2007-10-9 0:01:34编辑过]

 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
<上一主题 | 下一主题 >
Powered By KesionCMS Version X1
厦门科汛软件有限公司 © 2006-2016 页面执行0.13281秒 powered by KesionCMS 9.0