方法很简单,适当的修改和伪静态配合的产物,当然不伪静态也行啦,伪静态需要你的主机支持[ISAPI Rewrite]才行。
找到文件./FUNCTION/c_system_lib.asp,搜索”定义TGuestBook类”,在这一整段里面,搜索”guestbook.asp”,并替换成”taotao/”,如果不想静态化就替换成”taotao.asp”
大体上替换后的代码是这样的:
[code=vb] 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/page/url#>",s)
strPageBar=Replace(strPageBar,"<#pagebar/page/number#>",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/page/url#>",s)
strPageBar=Replace(strPageBar,"<#pagebar/page/number#>",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/page/url#>",s)
strPageBar=Replace(strPageBar,"<#pagebar/page/number#>",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[/code]
如果你不想静态化,去你的根目录,将guestbook.asp改名为taotao.asp,任务完成。
如果你准备静态化,在httpd.ini中加入如下代码:
因为留言板页面是动态的,所以不需要文件重建,可以直接看到效果。
个人不是很推崇这个修改方法,因为涉及到系统文件的修改,一但zblog升级就会还原回去。
9 Responses to “Z-blog技巧之留言板改成滔滔”
Sorry, the comment form is closed at this time.
哇、终于发出来了,之前好多人跟我要,因没经你同意一直没给呢,哈哈。[GRAVATAR=http://www.birdol.com/]acb31bc1883ad280a90d8044f61b3009[/GRAVATAR]
沙发一下。
换上去看看先·
密密麻麻,看不懂啊。
很好的东西
我还是来看一下
就是来看了、1
这个功能很实用,可惜要改源文件了
这个非常好玩。曾经很是想要~唉,现在都淡了~