zblog拓展链接管理项目

web前端664012年前 (2012-07-05)

如何使zblog拓展链接管理项目?先看一下效果图:

这里需要修改2个文件,一个是admin目录中的edit_link.ASP,另一个是function目录中的c_system_event.asp

1.用记事本或DW或editplus打开admin\edit_link.asp文件

找到下面这行代码:

<li><a href="#fragment-4"><span><%=ZC_MSG039%></span></a></li>

在其下面添加一行:

这里的“#fragment-5”一定要是唯一的,且要跟下面的“#fragment-5”保持一致

<li><a href="#fragment-5"><span>公告</span></a></li>

然后再找到下面这段代码:

tpath="./INCLUDE/misc.asp"

Response.Write "<p>" & ZC_MSG170 & ": </p><p><INPUT TYPE=""text"" Value="""&unEscape(tpath)&""" style=""width:100%"" readonly></p>"

Response.Write "<p></p>"

Response.Write "<p><textarea class=""resizable""   style=""height:300px;width:100%"" name=""txaContent_Misc"" id=""txaContent_Misc"">"&TransferHTML(LoadFromFile(BlogPath & unEscape(tpath),"utf-8"),"[textarea]")&"</textarea></p>" & vbCrlf

Response.Write "</div>"

在这段代码后面增加一段:

注意:这里的 id=“”fragment-5“”跟上面的对应

Response.Write "<div class=""tabs-div"" id=""fragment-5"">"  

tpath="./INCLUDE/announcement.asp"'自己添加的公告

Response.Write "<p>" & ZC_MSG170 & ": </p><p><INPUT TYPE=""text"" Value="""&unEscape(tpath)&""" style=""width:100%"" readonly></p>"

Response.Write "<p></p>"

Response.Write "<p><textarea class=""resizable""   style=""height:300px;width:100%"" name=""txaContent_Announcement"" id=""txaContent_Announcement"">"&TransferHTML(LoadFromFile(BlogPath & unEscape(tpath),"utf-8"),"[textarea]")&"</textarea></p>" & vbCrlf

Response.Write "</div>"

保存关闭文件

2.打开function\c_system_event.asp文件

找到下面这段代码:

tpath="./INCLUDE/misc.asp"

txaContent=Request.Form("txaContent_Misc")

If IsEmpty(txaContent) Then txaContent=Null

If Not IsNull(tpath) Then

If Not IsNull(txaContent) Then

Call SaveToFile(BlogPath & tpath,txaContent,"utf-8",False)

End IF

End If

在其后面增加下面这段:

tpath="./INCLUDE/announcement.asp"    '这段是为了添加公告自己增加的

txaContent=Request.Form("txaContent_Announcement")

If IsEmpty(txaContent) Then txaContent=Null

If Not IsNull(tpath) Then

If Not IsNull(txaContent) Then

Call SaveToFile(BlogPath & tpath,txaContent,"utf-8",False)

End IF

End If

保存并关闭文件,修改部分就完成了,接下来就是调用,调用很简单,只需要在模板中添加自己想要调用便笺的位置,将标签放进去即可。

调用标签:<#CACHE_INCLUDE_ANNOUNCEMENT#>

重点:在这里需要说明一下,我这里用的文件名是announcement.asp,所以在程序和调用标签中用到的都是这个名字,如需其它名字,请根据自己需求调整。

原作者:BigPig