“历史存档”目录存档

LBS博客蓝色皮肤

2007年10月19日,Friday

LBS博客蓝色皮肤
记忆中做过不少蓝色的lbs皮肤,这款皮肤也只能算是以前的一些改进吧。

     1、着重对文章标题部分进行重新设计
     2、使用google搜索替换站内搜索
     3、增加各RSS订阅
     4、增加文章版权说明
     5、增加同类信息搜索
     6、增加随机阅读和10大热贴模块

整套皮肤对lbs架构修改较大,所以提供lbs整包(除数据库与upload),不喜甚用。修改涉及到global.asp default.asp article.asp functions.asp ubbcodeasp style.css以及增加若干图片。文件中已清理本blog中广告代码和相关链接(设计版权链接保留)提数据库即可入住。如有问题欢迎大家留言,我将尽快帮你解决。

下载地址:http://5key.net/down/lbs-blue-skin.rar

给LBS添加文章相关搜索(In Google)

2007年07月27日,Friday

  Updata at 2007-07-27:有的朋友可能在添加后搜索结果是乱码。这个是编码上有问题。将代码
  <input type=”hidden” name=”ie” value=”GB2312″></input>中的GB2312转换成utf-8即可。

  Robertmao在文章《Add Google Search box to blog post plugin》中提供了一个WP下的插件。通过它可以在文章中提供一个文章标题在Google中的搜索。
  
  这个小插件一来可以方便你查询自己这篇文章在google中收录的情况,二来可以方便阅读此文章的用户在搜索引擎中去找寻更多相关的内容。研究了一下。其实我们修改一下。在LBS下也可以实现。

  首先,我们需要一段Google搜索的代码。如果你有申请Adsense,可以去AdSense for Search中设置一下颜色获取代码。如果你没有,也可以用下面这段试试。

<!– SiteSearch Google –>
<form method=”get” action=”http://www.google.com/custom” target=”google_window”>
<table border=”0″ bgcolor=”#EAF8F9″>
<tr><td nowrap=”nowrap” valign=”top” align=”left” height=”32″>

<input type=”hidden” name=”domains” value=”5key.net”></input>
<label for=”sbi” style=”display: none”>输入您的搜索字词</label>
<input type=”text” name=”q” size=”24″ maxlength=”255″ value=”" id=”sbi”></input>
<label for=”sbb” style=”display: none”>提交搜索表单</label>
<input type=”submit” name=”sa” value=”Google 搜索” id=”sbb”></input>
</td></tr>
<tr>
<td nowrap=”nowrap”>
<table>
<tr>
<td>
<input type=”radio” name=”sitesearch” value=”" checked id=”ss0″></input>
<label for=”ss0″ title=”搜索网络”><font size=”-1″ color=”black”>Web</font></label></td>
<td>
<input type=”radio” name=”sitesearch” value=”5key.net” id=”ss1″></input>
<label for=”ss1″ title=”搜索 5key.net”><font size=”-1″ color=”black”>5key.net</font></label></td>
</tr>
</table>
<input type=”hidden” name=”client” value=”pub-8183794716388413″></input>
<input type=”hidden” name=”forid” value=”1″></input>
<input type=”hidden” name=”ie” value=”utf-8″></input>
<input type=”hidden” name=”oe” value=”utf-8″></input>
<input type=”hidden” name=”cof” value=”GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:1″></input>
<input type=”hidden” name=”hl” value=”zh-CN”></input>
</td></tr></table>
</form>
<!– SiteSearch Google –>

将其粘贴到article.asp中

<div class=”textbox-fontsize”>
粘贴到这里。。。
</div>

现在我们只是完成了在文章底部添加一个google搜索。我们还需要给搜索框添加默认值。这里我们就需要获取此篇文章的标题。

在article.asp中搜索代码:

h4

其中的<%=func.HTMLEncode(theArticle.title)%>就是我们文章标题的内容了。

回到我们刚才的google search的代码,找到如下代码:

<input type=”text” name=”q” size=”35″ maxlength=”255″ value=” ” id=”sbi”></input>

<%=func.HTMLEncode(theArticle.title)%>粘贴到 value=“ ”中就ok了。

效果如下图:

uploads/200707/27_114258_a.gif

总结:在这里我们只是做了对文章标题的相关搜索。如果你的LBS加装了Tag,你也可以在这里设置对tag的搜索。同理,这个插件也可以在别的blog系统上实现。

  
  

LBS文章添加书签收藏

2007年07月25日,Wednesday

  越来越多的朋友开始使用网络收藏夹收集自己喜欢的文章帖子。中午花了点时间在lbs上添加了4个自己觉得还不错的网络收藏夹。(图片中是为一朋友新设计的LBS皮肤,稍后时间会提供下载)
  
uploads/200707/13_161013_1.gif

差点忘记了图片,上传至\styles\default\images文件夹下。
Click Here To Download

添加方式很简单。打开article.asp,找到textbox-title代码段:

 <div class=”textbox-title”>
… 
</div>

在下面添加代码,如果你还想添加别的网络收藏夹,可以到网站上找寻其js调用代码添加。

 <div class=”cang”>
      <script type=”text/javascript”>document.write(‘<a href=”javascript:u=location.href;t=document.title;c=%22%22+(window.getSelection?window.getSelection():document.getSelection?document.getSelection():document.selection.createRange().text);c=c.substr(0,480);var url=%22http://cang.baidu.com/do/add?it=%22+encodeURIComponent(t)+%22&iu=%22+encodeURIComponent(u)+%22&dc=%22+encodeURIComponent(c)+%22&fr=js#nw=1%22;window.open(url,\’_blank\’,\’scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes\’);void 0″ mce_href=”javascript:u=location.href;t=document.title;c=%22%22+(window.getSelection?window.getSelection():document.getSelection?document.getSelection():document.selection.createRange().text);c=c.substr(0,480);var url=%22http://cang.baidu.com/do/add?it=%22+encodeURIComponent(t)+%22&iu=%22+encodeURIComponent(u)+%22&dc=%22+encodeURIComponent(c)+%22&fr=js#nw=1%22;window.open(url,\’_blank\’,\’scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes\’);void 0″><img border=”0″ src=”styles/default/images/cang_baidu.gif” mce_src=”styles/default/images/cang_baidu.gif” border=”0″ align=”absmiddle” title=”收藏的网页将被保存到百度收藏http://cang.baidu.com/”></a>’);</script>      
      <a href=”javascript:window.open(‘http://shuqian.qq.com/post?from=3&title=’+encodeURIComponent(document.title)+’&uri=’+encodeURIComponent(document.location.href)+’&jumpback=2&noui=1′,’favit’,'width=930,height=470,left=50,top=50,toolbar=no,menubar=no,location=no,scrollbars=yes,status=yes,resizable=yes’);void(0)” mce_href=”javascript:window.open(‘http://shuqian.qq.com/post?from=3&title=’+encodeURIComponent(document.title)+’&uri=’+encodeURIComponent(document.location.href)+’&jumpback=2&noui=1′,’favit’,'width=930,height=470,left=50,top=50,toolbar=no,menubar=no,location=no,scrollbars=yes,status=yes,resizable=yes’);void(0)” ><img src=”styles/default/images/cang_qq.gif” mce_src=”styles/default/images/cang_qq.gif” /></a>
      <a href=”#” mce_href=”#” onclick=”window.open(‘http://myweb.cn.yahoo.com/popadd.html?url=’+encodeURIComponent(document.location.href)+’&title=’+encodeURIComponent(document.title), ’Yahoo’,’scrollbars=yes,width=780,height=550,left=80,top=80,status=yes,resizable=yes’);”><img src=”styles/default/images/cang_yahoo.gif” mce_src=”styles/default/images/cang_yahoo.gif” border=0></a>
        <a href=”http://del.icio.us/post” mce_href=”http://del.icio.us/post” onclick=”window.open(‘http://del.icio.us/post?v=4&noui&jump=close&url=’+encodeURIComponent(location.href)+’&title=’+encodeURIComponent(document.title), ’delicious’,'toolbar=no,width=700,height=400′); return false;”><img src=”styles/default/images/cang_del.gif” mce_src=”styles/default/images/cang_del.gif” /></a>
      </div>

CSS部分则添加了一个新类,你可以按照自己位置的需求去调整。

.cang{margin:6px 0 0 5px;}

Demo 某某工作室

2007年07月25日,Wednesday

很普通,很简单。没啥好说的。

uploads/200706/25_153507_1.jpg

Chinay2007调查…

2007年07月25日,Wednesday

  这两天被某域名服务商弄得郁闷死。注册个域名而已,这么麻烦,后台老是显示不成功。客服和我解释接口比较忙,需要排队。。。。我还真没在哪个网站注册域名遇到过这种事情。虽然客服服务态度还行,但是你已经影响到我的项目进程。。。算了,我还是换地方。

NND…忘记正题了。工作记录:Chinay2007调查

预览地址:http://5key.net/demo/Chinay_07_06_21/

uploads/200706/21_131828_2.gif