Salad UN

To Taste The Salad Of Life.

« KingCMS安装在Godaddy修改记录-2认识DedeCms模板的勾子技术 »

KingCMS安装在Godaddy修改记录-3

[ At 2009-2-18 By Ash   0 comments ]

相关文章:[KingCMS安装在Godaddy修改记录-2] [KingCMS安装在Godaddy修改记录]

昨天修改了KingCMS在Godaddy上后台登陆的问题,今天又有人提到前台路径分页路径有问题:

当文章前台列表是第一页的话,第一页的连接没有问题,但一旦分页后就出问题了,链接样式如下

http://www.21-v.org/list/

http://www.21-v.org/list/1/

http://www.21-v.org/list/2

这里看得出list后面跟的第二个分页少一个“/”,这样页面跳转就会出问题了,会将域名绑定的目录显示出来,显示成http://www.21-v.org/demo/pass/list/2

找了一下,修改page/system/fun.asp,搜索'pagelist,大概在2684行

function pagelist(l1,l2,l3,l5)
 if instr(l1,"$")=0 then exit function
 if l5=0 then exit function
 dim l4,k,l6,l7,I2
 l2=int(l2):l3=int(l3):l5=int(l5)
 if l2>3 then
  l4=("<a href="""&replace(l1,"$","")&""">1 ...</a>")'
 end if
 if l2>2 then
  l4=l4&("<a href="""&replace(l1,"$",l2-1)&""">&lsaquo;&lsaquo;</a>")
 elseif l2=2 then
  l4=l4&("<a href="""&replace(l1,"$","")&"/"">&lsaquo;&lsaquo;</a>")
 end if
 for k=l2-2 to l2+7
  if k>=1 and k<=l3 then
   if cstr(k)=cstr(l2) then
    l4=l4&("<strong>"&k&"</strong>")
   else
    if k=1 then
     l4=l4&("<a href="""&replace(l1,"$","")&""">"&k&"</a>")
    else
     l4=l4&("<a href="""&replace(l1,"$",k)&"/"">"&k&"</a>")
    end if
   end if
  end if
 next
 if l2<l3 and l3<>1 then
  l4=l4&("<a href="""&replace(l1,"$",l2+1)&"/"">&rsaquo;&rsaquo;</a>")
 end if
 if l2<l3-7 then
  l4=l4&("<a href="""&replace(l1,"$",l3)&"/"">... "&l3&"</a>")
 end if

 I2=split(l1,"$")
 pagelist="<span class=""k_pagelist""><em>"&l5&"</em>"&l4&"</span>"
end function

高亮部分是修改过的,我测试分页3页没问题,如果上10页有问题再留言吧,按道理修改都是在这个地方。

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

日历

最新评论及回复

最近发表

Powered By Z-Blog 1.8 Spirit Build 80722 Code detection by Codefense

Copyright 2008 www.s-un.cn. Some Rights Reserved.