威言威语
我愿像茶,苦涩留心,清香予人。
威言威语
当前位置: 首页 > 设计 > 正文

为PJBlog添加 收藏到网摘

为PJBlog添加 收藏到网摘 这个类插件的小代码在很早之前就有人发布在论坛上了,不过随着博客系统的升级以及部分网摘的链接实效了,这次我修整了其中的错误链接并添加了一些更加实用的网摘,比如饭否,校内,抓虾,鲜果,QQ书签,有道。这些网摘相对以前博友提供的很多外国的网摘效果应该会好一些,毕竟上我们网站的基本都是国人。
为PJBlog添加 收藏到网摘

为PJBlog添加 收藏到网摘 这个类插件的小代码在很早之前就有人发布在论坛上了,不过随着博客系统的升级以及部分网摘的链接实效了,这次我修整了其中的错误链接并添加了一些更加实用的网摘,比如饭否,校内,抓虾,鲜果,QQ书签,有道。这些网摘相对以前博友提供的很多外国的网摘效果应该会好一些,毕竟上我们网站的基本都是国人。

我是在 PJBlog3 v3.0.6.170 半静态模式下调试的,其他版本类似。

好啦,上代码。


<img src="images/icon_edit.gif" style="margin:4px 2px -4px 0px" alt=""/><strong>收藏到网摘:</strong>

<a href="javascript:u=location.href;t=document.title;c = %22%22 + (window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text);var url=%22http://cang.baidu.com/do/add?it=%22+encodeURIComponent(t)+%22&iu=%22+encodeURIComponent(u)+%22&dc=%22+encodeURIComponent(c)+%22&fr=ien#nw=1%22;window.open(url,%22_blank%22,%22scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes%22); void 0" title="百度收藏"><img alt=百度收藏 src="images/wangzhai/baidu.gif" border=0></a>

<a href="javascript:location.href='http://www.google.com/bookmarks/mark?op=add&bkmk='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)"><img alt=Google书签 src="images/wangzhai/google.gif" border=0></a>

<a href="#" onclick="window.open('http://myweb.cn.yahoo.com/popadd.html?url='+encodeURIComponent(document.location.href)+'&title='+encodeURIComponent(document.title), 'Yahoo','scrollbars=yes,width=440,height=440,left=80,top=80,status=yes,resizable=yes');"><img src="images/wangzhai/yahoo.gif" border=0></a>

<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();"><img alt=新浪ViVi src="images/wangzhai/vivi.gif" border=0></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();"><img alt=365Key网摘 src="images/wangzhai/365key.gif" border=0></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();"><img alt=天极网摘 src="images/wangzhai/yesky.gif" border=0></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'));"><img alt=和讯网摘 src="images/wangzhai/hexun.gif" border=0></a>

<a target=_blank href="http://www.zhuaxia.com/add_channel.php?sourceid=102&url=http%3A%2F%2Fwww.weisay.com%2Fblog%2F"><img src="images/wangzhai/zhuaxia.gif" border="0" alt="订阅到抓虾" /></a>

<a target="_blank" title="订阅到鲜果 RSS阅读器" href="http://xianguo.com/subscribe?url=http%3A%2F%2Fwww.weisay.com%2Fblog%2F"><img src="images/wangzhai/xianguo.gif" border="0" alt="鲜果阅读器订阅图标" /></a>

<a target="_blank" href="http://reader.youdao.com/b.do?keyfrom=bookmarklet&url=http%3A%2F%2Fwww.weisay.com%2Fblog%2F"><img src="images/wangzhai/youdao.gif" border="0" alt="订阅到有道阅读" /></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/blog/logo.gif','keyit','scrollbars=no,width=475,height=575,status=no,resizable=yes'));keyit.focus();"><img alt=POCO网摘 src="images/wangzhai/poco.gif" border=0></a>

<a href="javascript:q=(document.location.href);void(open('http://www.digbuzz.com/submit.php?url='+encodeURIComponent(q),'',''));"><img src="images/wangzhai/wa.gif" border="0" alt="添加到 Digbuzz 我挖网" /></a>

<a href="javascript:location.href='http://del.icio.us/post?&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)"><img alt=Del.icio.us src="images/wangzhai/delicious.gif" border=0></a>

<a href="javascript:location.href='http://digg.com/submit?phase=2&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)"><img alt=digg src="images/wangzhai/digg.gif" border=0></a>

<a href="javascript:location.href='http://reddit.com/submit?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)"><img alt=reddit src="images/wangzhai/reddit.gif" border=0></a>

<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)" ><img src="images/wangzhai/qq.gif" alt="添加到“QQ书签”" border="0"></a>

<a href="javascript:location.href='http://www.blinklist.com/index.php?Action=Blink/addblink.php&Description='+encodeURIComponent(document.title)+'&Url='+encodeURIComponent(location.href)+'&Title='+encodeURIComponent(document.title)"><img alt=BlinkList src="images/wangzhai/blinklist.gif" border=0></a>

<a href="javascript:u=location.href;t=document.title;void(open('http://www.igooi.com/addnewitem.aspx?noui=yes&jump=close&url='+escape(u)+'&title='+escape(t)+'&sel='+escape(document.selection.createRange().text),'igooi', 'toolbar=no,width=400,height=480'));"><img src="images/wangzhai/igooi.gif" alt="添加到“igooi网摘”" border="0"></a>

<a href="javascript:var d=document,w=window,f='http://fanfou.com/share',l=d.location,e=encodeURIComponent,p='?u='+e(l.href)+'?t='+e(d.title)+'?d='+e(w.getSelection?w.getSelection().toString():d.getSelection?d.getSelection():d.selection.createRange().text)+'?s=bl';if(!w.open(f+'r'+p,'sharer','toolbar=0,status=0,width=600,height=400')){l.href=f+'.new'+p;}void(0)"><img border=0 src="images/wangzhai/fanfou.gif" alt="分享到饭否" /></a>

<a href="javascript:void((function(s,d,e){if(/xiaonei\.com/.test(d.location))return;var f='http://share.xiaonei.com/share/buttonshare.do?link=',u=d.location,l=d.title,p=[e(u),'&title=',e(l)].join('');function a(){if(!window.open([f,p].join(''),'xnshare',['toolbar=0,status=0,resizable=1,width=626,height=436,left=',(s.width-626)/2,',top=',(s.height-436)/2].join('')))u.href=[f,p].join('');};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else a();})(screen,document,encodeURIComponent));"><img border=0 src="images/wangzhai/xiaonei.gif" alt="分享到校内" /></a><br/>

<!--网摘结束-->

请将上面这段代码加到 class 文件夹下 cls_article.asp 中


<%=getTag.filterHTML(log_ViewArr(19,0))%><br/>

的后面。

还有就是加到 Template 文件夹下 Article.asp 中

<$log_tag$><br/>

的后面。

并把下面的图片文件夹放到 images 文件夹里面,然后进后台重新生成数据库就行了。

网盘下载:提取码: 8ghq

您可能还会对这些文章感兴趣!

为PJBlog添加 收藏到网摘:目前有 5 条评论

  1. 左岸岛
    5楼

    请教下,PJ V300+ 版本的,都有自带的“相关日志”功能,但我更想用原先论坛里发的加强版的“相关日志”插件,因为插件装上了,系统自带的就重复了,怎么修改呢?或是去掉自带的……

    William 于 2009-10-09 08:36 AM 回复

    我是去掉了系统自带的相关日志功能,装了wbc的相关日志加强版
    去掉
    [code]<img src="images/notify.gif" style="margin:4px 2px -4px 0px" alt=""/><strong>相关日志:</strong>
    <div class="Content-body" id="related_tag" style="margin-left:25px"></div>
    <script language="javascript" type="text/javascript">check(‘Getarticle.asp?id=<$LogID$>&blog_postFile=1′,’related_tag’,’related_tag’)</script>[/code]

    2009-10-09 17:51 回复
  2. wuhen
    4楼
    wuhen:Google Chrome 14.0.835.202 Windows 7

    你好 我用 后 引用 出现了 乱码

    William 于 2009-08-22 08:36 AM 回复

    乱码?你按要求一步一步做的么?我用的时候没有出现这样的情况的啊~

    2009-08-21 17:56 回复
  3. ccbikai
    地板
    ccbikai:枫树极速浏览器 1.4.2.0 Windows XP

    分 享 到 校内 是 效 了

    William 于 2009-05-17 07:15 PM 回复

    嗯,当然有效!

    2009-05-16 18:43 回复
  4. huangbitao
    板凳
    huangbitao:Google Chrome 21.0.1180.89 Windows XP

    不行啊 博主 我的按照你的方法去做了 可是没得什么变化啊~~然后进后台重新生成数据库就行了!这个是什么意思?

    William 于 2009-05-17 07:18 回复

    修改文件之后当然没有变化,要重新生成数据库。方法:
    进后台 – 站点基本设置 – 初始化数据,看选项,打钩,保存设置,就OK了!

    2009-05-16 18:23 回复
  5. qqbird
    沙发
    qqbird:Google Chrome 18.0.1025.168 Windows XP

    补充:日志输出模式为全静态模式时,也要把代码添加到Template 文件夹下 static.htm 中<$log_tag$>
    后面。
    另外:以上代码中的订阅部分,要修改为自己博客的地址!
    哈哈,不知道博主是不是故意这样发布的

    William 于 2009-05-13 12:05 回复

    我的那个是在半静态下,静态的没有研究。
    以上代码加进去就可以,不必修改。我用的是相对路径,所以不用修改!

    2009-05-11 19:01 回复

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

gravatar

question razz sad smile redface biggrin eek shock confused cool lol mad rolleyes wink cry