日志后面增加了“添加到各大网摘”的功能

© 2007年10月20日 Filed under: 网络日志

今天在菜雨博客看到一段很感兴趣的代码,这段代码可以让我实现在每篇日志后面加入”添加到各大网摘”功能!效果请看本日志后面~有兴趣的朋友可以试试,代码是这样的:

<!– –>
<img src=”images/quote.gif” style=”margin:4px 2px -4px 0px” alt=””/><strong>收藏到网摘:</strong><a href=”javascript:d=document;t=d.selection?(d.selection.type!=’None’?d.selection.createRange().text:”):(d.getSelection?d.getSelection():”);void(vivi=window.open(’http://vivi.sina.com.cn/collect/icollect.php?pid=28&title=’+escape(d.title)+’&url=’+escape(d.location.href)+’&desc=’+escape(t),’vivi’,’scrollbars=no,width=480,height=480,left=75,top=20,status=no,resizable=yes’));vivi.focus();”><font color=”#FFA620″>新浪VIVI</font></a>
<a href=”javascript:d=document;t=d.selection?(d.selection.type!=’None’?d.selection.createRange().text:”):(d.getSelection?d.getSelection():”);void(keyit=window.open(’http://z.sohu.com/storeit.do?t=’+escape(d.title)+’&u=’+escape(d.location.href)+’&c=’+escape(t),’keyit’,’scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes’));keyit.focus();”><font color=”#FFD600″>狐摘</font></a>
<a href=”javascript:d=document;t=d.selection?(d.selection.type!=’None’?d.selection.createRange().text:”):(d.getSelection?d.getSelection():”);void(keyit=window.open(’http://www.365key.com/storeit.aspx?t=’+escape(d.title)+’&u=’+escape(d.location.href)+’&c=’+escape(t),’keyit’,’scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes’));keyit.focus();”><strong><font color=”#a287be”>365k</font><font color=”#00CC00″>e</font><font color=”#a287be”>y</font></strong></a>
<a href=”javascript:d=document;t=d.selection?(d.selection.type!=’None’?d.selection.createRange().text:”):(d.getSelection?d.getSelection():”);void(yesky=window.open(’http://hot.yesky.com/dp.aspx?t=’+escape(d.title)+’&u=’+escape(d.location.href)+’&c=’+escape(t)+’&st=2′,’yesky’,’scrollbars=no,width=400,height=480,left=75,top=20,status=no,resizable=yes’));yesky.focus();”><font color=”#97ce12″>天极</font><font color=”#ff7f00″>网摘</font></a>
<a href=”javascript:d=document;t=d.selection?(d.selection.type!=’None’?d.selection.createRange().text:”):(d.getSelection?d.getSelection():”);void(wozhai=window.open(’http://www.wozhai.com/wozhai/Cento.asp#t=’+escape(d.title)+’&u=’+escape(d.location.href)+’&c=’+escape(t),’wozhai’,’scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes’));wozhai.focus();”><font color=blue>我摘</font></a>
<a href=”javascript:d=document;t=d.selection?(d.selection.type!=’None’?d.selection.createRange().text:”):(d.getSelection?d.getSelection():”);void(keyit=window.open(’http://my.poco.cn/fav/storeIt.php?t=’+escape(d.title)+’&u=’+escape(d.location.href)+’&c=’+escape(t)+’&img=http://www.h-strong.com//logo.gif’,’keyit’,’scrollbars=no,width=475,height=575,status=no,resizable=yes’));keyit.focus();”><font color=”#293184″>PO</font><font color=”#23B6E7″>CO网摘</font></a>
<a href=”javascript:d=document;t=d.selection?(d.selection.type!=’None’?d.selection.createRange().text:”):(d.getSelection?d.getSelection():”);void(keyit=window.open(’http://blogmark.blogchina.com/jsp/key/quickaddkey.jsp?k=’+encodeURI(d.title)+’&u=’+encodeURI(d.location.href)+’&c=’+encodeURI(t),’keyit’,’scrollbars=no,width=500,height=430,status=no,resizable=yes’));keyit.focus();”><font color=”#FF0000″>博采中心</font></a>
<a href=”javascript:u=location.href;t=document.title; void(open(’http://www.YouNote.com/NoteIt.aspx?u=’+escape(u)+’& t=’+escape(t)+’&c=’+escape(document.selection.createRange().text),’网络书签’, ‘toolbar=no,width=475,height=575,left=75,top=20,status=no,resizable=yes’));”><font color=”#FF9900″>YouNote</font></a>
<A href=”javascript:t=document.title;u=location.href;e=document.selection?(document.selection.type!=’None’?document.selection.createRange().text:”):(document.getSelection?document.getSelection():”);void(open(’http://bookmark.hexun.com/post.aspx?title=’+escape(t)+’&url=’+escape(u)+’&excerpt=’+escape(e),’HexunBookmark’,’scrollbars=no,width=600,height=450,left=80,top=80,status=no,resizable=yes’));”><font color=”#86CCFE”>和讯网摘</font></A>
<A href=”javascript:d=document;t=d.selection?(d.selection.type!=’None’?d.selection.createRange().text:”):(d.getSelection?d.getSelection():”);void(keyit=window.open(’http://www.365fav.com/StorePage.asp?title=’+escape(d.title)+’&urlstr=’+escape(d.location.href)+’&content=’+escape(t),’fav’,’scrollbars=no,width=475,height=500,left=75,top=20,status=no,resizable=yes’));
keyit.focus();”><font color=”#0068BA”>天天收藏</font></A>
<a href=”javascript:d=document;t=d.selection?(d.selection.type!=’None’?d.selection.createRange().text:”):(d.getSelection?d.getSelection():”);void(blog=window.open(’http://www.bolaa.com/CommendBlog/SmallLogin.aspx?title=’+escape(d.title)+’&newspath=’+escape(d.location.href)+’&subtitle=’+escape(t),’bolaa’,’width=400px,height=400px’));blog.focus();”><font color=”#ef3e1d”>博拉网</font></a>
<!– 添加网摘结束 –>

使用方法,以本blog程序(PJBLOG)为例:首先找到 Template 目录,用文本编辑器,比如记事本打开 Article.asp  找到

<img src=”images/icon_trackback.gif” style=”margin:0px 2px -4px 0px” alt=””/><strong>引用通告地址:</strong> <a href=”<$trackback$>” target=”_blank”><$trackback$></a>

可以增加在前或者后,随你喜欢!添加成功把文件传到服务器上面,然后到后台-站点基本信息-初始化数据-重新生成所有日志到文件,执行就可以了.

随机文章推荐...

上周前六:
  • 范宝胜 (1)
  • 刺鸟 (1)
  • tiao58 (1)
  • 唱着红歌看小片 (1)
  • 跪求 (1)
  • 不是啊 (1)
  • 我要上榜

    One Comment

    1. 创意我爱你 说道:

      不错.回去研究一下,然后加在自己的网站里,哈哈

    Post a Comment