龙三公子博客 - 让自己的内心藏着一条巨龙,既是一种苦刑,也是一种乐趣!
龙三公子博客是一个草根站!一个业余电脑爱好者的独立博客,博客内容综合,主要有电脑网络、健康养生、日常生活等!

Zblog添加自定义页面调用footer和header

        由于zblog 1.8的后台wordpress要简单的多,后台也没有添加自定义页面的功能,但是像添加about关于页面、或者我添加的文章归档页面等我们想要怎么办。zblog如何添加自定义页面呢?自己编代码制作一个页面,这对于我等不懂代码的人来说是不可能的或者说非常困难的,后台没有添加的功能不代表就不能通过方法实现,我们可以修改,这里提供如下修改方法:

        通过修改default页面,但是我认为还不如修改tags.asp 页面,tags.asp 页面与我们想要的link.html相似度比较高,修改方法如下:

        先复制tags.asp 页面的代码在记事本里面,然后另存为link.asp。修改 link.asp 文件中 ArtList.template="TAGS" 和 ArtList.TITle="TagCloud",将 TAGS 改为 LINK ,TagCloud 改为友情链接,并保存。然后再复制主题目录下的 tags.html 文件内容用记事本保存在本地,并命名为 link.html。修改 link.html 文件中 <h2 class="post-title">TagCloud</h2>,将 TagCloud 改为友情链接。将 link.asp 文件上传到网站根目录,将 link.html 文件上传到 TEMPLATE 目录。在导航条中添加代码 <li><a href="<%=ZC_BLOG_HOST%>link.asp">友情链接</a></li>。将 <div class="post-body"><#CUSTOM_TAGS#></div> 中的 <#CUSTOM_TAGS#> 换成你的友情链接内容(用HTML代码表示)。

        或者我们这样作(同上面方法相像),首先新建一个asp文件。比如在根目录新建about.asp文件,然后在模板文件夹下新建一个about.html调用。而about.html只要复制首页模板、文章页模板随便挑选一个,复制一个改下名字,修改就跟其他模板一模一样。而about.asp里面的内容可以这样写。

  <%@ CODEPAGE=65001 %>
  <%
  ‘///////////////////////////////////////////////////////////////////////////////
  ‘//              Z-Blog
  ‘// 作    者:    朱煊(zx.asd)
  ‘// 版权所有:    RAInbowSoft Studio
  ‘// 技术支持:    rainbowsoft@163.com
  ‘///////////////////////////////////////////////////////////////////////////////
  %>
  <% 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 node
  For Each sAction_Plugin_Searching_Begin in Action_Plugin_Searching_Begin
  If Not IsEmpty(sAction_Plugin_Searching_Begin) Then Call Execute(sAction_Plugin_Searching_Begin)
  Next
  Dim ArtList
  Set ArtList=New TArticleList
  ArtList.LoadCache
  ‘About就是模板的名称
  ArtList.template=”About”
  ArtList.Build
  Response.Write ArtList.html
  ‘plugin node
  For Each sAction_Plugin_Searching_End in Action_Plugin_Searching_End
  If Not IsEmpty(sAction_Plugin_Searching_End) Then Call Execute(sAction_Plugin_Searching_End)
  Next
  Call System_Terminate()
  %><!– <%=RunTime()%>ms –><%
  If Err.Number<>0 then
  Call ShowError(0)
  End If
  %>

 

打赏 Zblog添加自定义页面调用footer和header  龙三公子 博客程序 程序代码 博客 zblog 第1张支付宝打赏 Zblog添加自定义页面调用footer和header  龙三公子 博客程序 程序代码 博客 zblog 第2张微信打赏
爆品精选

标签: 龙三公子 博客程序 程序代码 博客 zblog
分类:主页制作| 发布:xiadao81| 查看:5094 | 发表时间:2012-08-10
原创文章如转载,请注明:转载自龙三公子博客 https://www.mybabycastle.com/
本文链接:https://www.mybabycastle.com/post/7.html
已经有 ( 0 ) 位网友发表了评论,你也评一评吧!  

Design By XvDesign.Com | Power By Z-BlogPHP 1.7.3
点击关闭
  • 联系客服