方法很简单,适当的修改和伪静态配合的产物,当然不伪静态也行啦,伪静态需要你的主机支持[ISAPI Rewrite]才行。
找到文件./FUNCTION/c_system_lib.asp,搜索"定义TGuestBook类",在这一整段里面,搜索"guestbook.asp",并替换成"taotao/",如果不想静态化就替换成"taotao.asp"
大体上替换后的代码是这样的:
j=objRS.PageCount
If j>0 Then
Dim a,b,s,t,intNowPage,strPageBar
s=ZC_BLOG_HOST & "taotao/"
t=""
intNowPage=intPage
strPageBar=GetTemplate("TEMPLATE_B_PAGEBAR")
strPageBar=Replace(strPageBar,"<#pagebar>",s)
strPageBar=Replace(strPageBar,"<#pagebar>",ZC_MSG285)
Template_PageBar=Template_PageBar & strPageBar
If j>ZC_PAGEBAR_COUNT Then
a=intNowPage
b=intNowPage+ZC_PAGEBAR_COUNT
If a>ZC_PAGEBAR_COUNT Then a=a-1:b=b-1
If b>j Then b=j:a=j-ZC_PAGEBAR_COUNT
Else
a=1:b=j
End If
For i=a to b
s=ZC_BLOG_HOST & "taotao/"& t &"page/"& i &".html"
If i=1 Then
s=ZC_BLOG_HOST & "taotao/"
End If
strPageBar=GetTemplate("TEMPLATE_B_PAGEBAR")
If i=intNowPage then
Template_PageBar=Template_PageBar & "" & i & ""
Else
strPageBar=Replace(strPageBar,"<#pagebar>",s)
strPageBar=Replace(strPageBar,"<#pagebar>",i)
Template_PageBar=Template_PageBar & strPageBar
End If
Next
s=ZC_BLOG_HOST & "taotao/"& t &"page/"& j &".html"
If j=1 Then
s=ZC_BLOG_HOST & "taotao/"
End If
strPageBar=GetTemplate("TEMPLATE_B_PAGEBAR")
strPageBar=Replace(strPageBar,"<#pagebar>",s)
strPageBar=Replace(strPageBar,"<#pagebar>",ZC_MSG286)
Template_PageBar=Template_PageBar & strPageBar
If intNowPage=1 Then
Template_PageBar_Previous=""
Else
Template_PageBar_Previous=""&ZC_MSG156&""
End If
If intNowPage=intPageCount Then
Template_PageBar_Next=""
Else
Template_PageBar_Next=""&ZC_MSG155&""
End If如果你不想静态化,去你的根目录,将guestbook.asp改名为taotao.asp,任务完成。
如果你准备静态化,在httpd.ini中加入如下代码:
#滔滔静态化 RewriteRule /taotao /guestbook\.asp RewriteRule /taotao/page/(.*).html /guestbook\.asp\?page=$1 RewriteRule /taotao/ /guestbook\.asp
因为留言板页面是动态的,所以不需要文件重建,可以直接看到效果。
个人不是很推崇这个修改方法,因为涉及到系统文件的修改,一但zblog升级就会还原回去。
转载请注明:鸟儿博客 » Z-blog技巧之留言板改成滔滔