Z-Blog 博客添加自定义页面的方法教程

时间:2019-08-29   阅读:492

本很喜欢 Z-Blog 博客系统,够简洁,够简单,使用够方便,我第一次正式开博客用的就是它,但 Z-Blog 有个方面我很不喜欢,就是不能添加“关于我们”等之类的自定义页面,不能添加自定义页面,就导致很多东西不能实现,很不爽。不过系统是死的,人是活的,系统不支持,博主总会想出解决的办法。

Z-Blog 添加自定义页面的步骤:

  1. 新加一个.asp文件,并命名为links.asp(可以是其它的),然后在文件中添加以下代码:

    <%@ CODEPAGE=65001 %><%'///////////////////////////////////////////////////////////////////////////////'//              Z-Blog'// 作    者:    朱煊(zx.asd) & Sipo'// 版权所有:    RainbowSoft Studio'// 技术支持:    rainbowsoft@163.com'// 程序名称:    '// 程序版本:    '// 单元名称:    links.asp'// 开始时间:    2007-01-03'// 最后修改:    '// 备    注:    links'///////////////////////////////////////////////////////////////////////////////%><% Option Explicit %><% On Error Resume Next %><% Response.Charset="UTF-8" %><% Response.Buffer=True %><!-- #include file="c_option.asp" -->
    <!-- #include file="function/c_function.asp" -->
    <!-- #include file="function/c_function_md5.asp" -->
    <!-- #include file="function/c_system_lib.asp" -->
    <!-- #include file="function/c_system_base.asp" -->
    <!-- #include file="function/c_system_event.asp" -->
    <!-- #include file="function/c_system_plugin.asp" -->
    <!-- #include file="plugin/p_config.asp" --><%Call System_Initialize() 'plugin nodeFor Each sAction_Plugin_Guestbook_Begin in Action_Plugin_Guestbook_Begin	If Not IsEmpty(sAction_Plugin_Guestbook_Begin) Then Call Execute(sAction_Plugin_Guestbook_Begin)Next Dim ArtList 
    Set ArtList=New TArticleList 
     
    ArtList.LoadCache  
    ArtList.template="LINKS"   
        ArtList.Build  Response.Write ArtList.html    'plugin nodeFor Each sAction_Plugin_Guestbook_End in Action_Plugin_Guestbook_End	If Not IsEmpty(sAction_Plugin_Guestbook_End) Then Call Execute(sAction_Plugin_Guestbook_End)Next Call System_Terminate() %><!-- <%=RunTime()%>ms --><%If Err.Number<>0 thenCall ShowError(0)End If%>

    注:ArtList.template=”LINKS” 中的LINKS便是定义的页面

  2. 新建一个.html文件,并命名为links.html(可以直接使用主题目录下的tags.html文件修改),自定义页面要显示或调用的内容在该文件中修改

  3. 把links.asp文件上传到Z-blog根目录,把links.html文件上传至需要添加自定义页面的主题的TEMPALTE目录下

  4. 登陆博客后台,重建文件。自定义页面的访问地址便是http://域名/links.asp

提示:新移植的Z-Blog主题也用该方法调用ZB的网站收藏链接目录。

上一篇:实现 Z-Blog 博客评论分页显示效果的方法

下一篇:Z-Blog 评论留言的引用按钮写法详解

网友评论