后台添加Blog定制的服务...

[ 2007-10-29 19:23:32 | 作者: 生活笔谈 ]

【调整阅览字体大小】: | |

=========================
插件名称:后台添加Blog定制的服务...
插件修改:风来西林 (版权所有)
作者主页http://www.exgods.com/
=========================

  现在网络上各种方便的Blog服务很多,每次发现新的服务都需要改源代码...时间长了感觉蛮麻烦的,现在我改了下LBS代码,可以在后台自已添加定制的服务代码...

●在admin.asp中找到
<a href="?in=links">- <%=lang["links"]%></a><br />
下添加
<a href="?in=tech">- <%=lang["Tech"]%></a><br />

找到
// Links Page ---------------------------------------------------------------------
function outputLinks(){
%>
<div id="mainWrapper">
<div id="content" class="content">
<div id="innerContent">
<div class="textbox">
 <div class="textbox-title"><h4><%=lang["links"]%></h4></div>
 <div style="width: 100%">
 <table border="0" cellpadding="3" cellspacing="2" width="100%">
 <form name="inputform" method="post" action="?in=links&act=update">
 <tr>
 <td class="formbox-content">
 <!--fenglin add waplinks-->
 <a href="javascript:ChgLinks(1)"><%=lang["Html"]%></a>&nbsp;|&nbsp;<a href="javascript:ChgLinks(2)"><%=lang["Wap"]%></a>
 <div id="htmllinks" style="display:block">
 <textarea name="links" cols="64" rows="16" wrap="virtual" id="links" style="width:100%"><%=func.HTMLEncodeLite(theCache.settings["links"])%></textarea>
 </div>
<div id="waplinks" style="display:none">
 <textarea name="waplinks" cols="64" rows="16" wrap="virtual" id="links" style="width:100%"><%=func.HTMLEncodeLite(theCache.settings["waplinks"])%></textarea>
 </div>
 <!--fenglin add waplinks-->
 <br />
 <input type="submit" name="submit" value=" <%=lang["save_change"]%> " class="button" />
 </td>
 </tr>
 </form>
 </table>
 </div>
</div>
</div>
</div>
<% adminSidebar(); %>
<div class="clear"></div>
</div>
<%
}
下添加
// Tech Page ---------------------------------------------------------------------
function outputTech(){
%>
<div id="mainWrapper">
<div id="content" class="content">
<div id="innerContent">
<div class="textbox">
 <div class="textbox-title"><h4><%=lang["Tech"]%></h4></div>
 <div style="width: 100%">
 <table border="0" cellpadding="3" cellspacing="2" width="100%">
 <form name="inputform" method="post" action="?in=tech&act=update">
 <tr>
 <td class="formbox-content">
 <textarea name="tech" cols="64" rows="16" wrap="virtual" id="links" style="width:100%"><%=func.HTMLEncodeLite(theCache.settings["tech"])%></textarea>
 <input type="submit" name="submit" value=" <%=lang["save_change"]%> " class="button" />
 </td>
 </tr>
 </form>
 </table>
 </div>
</div>
</div>
</div>
<% adminSidebar(); %>
<div class="clear"></div>
</div>
<%
}
 
 
 
 
●在source/src_admin.asp中找到
 case "links":
 showLinks();
 break;
下添加
 case "tech":
 showTech();
 break;
 

找到
// Links Page /////////////////////////////////////////////////////////////////////////////////////
function showLinks(){
 // Update -------------
 if(input["act"]=="update"){
 connBlog.updateSQL("[blog_Settings]","set_value1='"+func.checkStr(input["links"])+"'","set_name='links'");
 //fenglin add waplinks save
 connBlog.updateSQL("[blog_Settings]","set_value1='"+func.checkStr(input["waplinks"])+"'","set_name='waplinks'");
 }

 theCache.loadSettings();
 outputLinks();
}
下添加
// Tech Page /////////////////////////////////////////////////////////////////////////////////////
function showTech(){
 // Update by fenlin
 if(input["act"]=="update"){
 connBlog.updateSQL("[blog_Settings]","set_value1='"+func.checkStr(input["tech"])+"'","set_name='tech'");
 }

 theCache.loadSettings();
 outputTech();}
 
 
 
 
●在表blog_Settings添加记录tech 1 0
 
 
 
 注意:区分大小写
●添加tech语言字段lang/admin.asp     t["Tech"]="Technology";
 
 
 
 注意:区分大小写
●在lang/blog.asp中加一个字段Technology     t["Technology"]="Technology";

●在global.asp中找到
 <div id="panelStats" class="panel">
 <h5><%=lang["stats"]%></h5>
 <div class="panel-content">
 <%=lang["articles"]%>: <%=theCache.settings["counterArticle"]%><br />
 <a href="comment.asp"><%=lang["comments"]%>: <%=theCache.settings["counterComment"]%></a><br />
 <a href="trackback.asp?act=list"><%=lang["trackbacks"]%>: <%=theCache.settings["counterTrackback"]%></a><br />
 <a href="user.asp"><%=lang["reg_users"]%>: <%=theCache.settings["counterUser"]%></a><br />
 <%if(theUser.groupID==1){%><a href="stats.asp" target="_blank"><%}%><%=lang["visitors"]%>: <%=theCache.settings["counterVisitor"]%><%if(theUser.groupID==1){%></a><%}%><br />
 <%=lang["online_user"]%>: <%=Application(lbsNamespace+"userOnline")%><br />
 <br />
 <a href="feed.asp" title="<%=lang["articles"]%><%=lang["rss_feed"]%>" target="_blank"><img src="<%=theCache.settings["imageFolder"]%>/rss_article.png" class="meta-button" alt="<%=lang["articles"]%><%=lang["rss_feed"]%>" /></a>
 <a href="feed.asp?selected=true" title="<%=lang["selected"]%><%=lang["rss_feed"]%>" target="_blank"><img src="<%=theCache.settings["imageFolder"]%>/rss_selected.png" class="meta-button" alt="<%=lang["selected"]%><%=lang["rss_feed"]%>" /></a><br />
 <a href="feed.asp?q=comment" title="<%=lang["comments"]%><%=lang["rss_feed"]%>" target="_blank"><img src="<%=theCache.settings["imageFolder"]%>/rss_comment.png" class="meta-button" alt="<%=lang["comments"]%><%=lang["rss_feed"]%>" /></a>
 <a href="http://www.unicode.org/" title="Unicode.org" target="_blank"><img src="<%=theCache.settings["imageFolder"]%>/utf8.png" class="meta-button" alt="Unicode Encoding" /></a>
 <a href="http://creativecommons.org/licenses/by-nc-sa/1.0/" title="Creative Commons Licensed" target="_blank"><img src="<%=theCache.settings["imageFolder"]%>/cc.png" class="meta-button" alt="Creative Commons Licensed" /></a>
 <a href="http://www.voidland.com/" title="Powered by LBS" target="_blank"><img src="<%=theCache.settings["imageFolder"]%>/lbs.png" class="meta-button" alt="Powered by LBS" /></a><br />
 </div>
 </div>
下添加
<div id="paneltech" class="panel">
<h5><%=lang["Technology"]%> </h5>
<div class="panel-content">
<%=theCache.settings["tech"]%>
</div>
</div>
 <div id="panelLinks" class="panel">
 <h5><%=lang["links"]%></h5>
 <div class="panel-content">
 <%=theCache.settings["links"]%>
 </div>

返回顶部

评论Feed 评论Feed: http://lbs.goeswell.cn/fans/feed.asp?q=comment&id=170
UTF-8 Encoding 引用链接: 点击查看引用链接

这篇文章没有评论。

发表
表情图标
[smile] [confused] [cool] [cry]
[eek] [angry] [wink] [sweat]
[lol] [stun] [razz] [redface]
[rolleyes] [sad] [yes] [no]
[heart] [star] [music] [idea]
UBB代码
转换链接
表情图标
悄悄话
用户名:   密码:   注册? 验证码 * 请输入验证码