为了方便有需要的朋友收藏小站有用的文章,做了一个收藏到 QQ书签 、 Google书签 、 百度搜藏 、 Yahoo收藏 、 乐收 的链接。其实网上也有很多第三方的js文件可以很方便的做到这一点,只需要加载一个js文件即可。因为DDBug不太喜欢加载第三方的东西,能不加载就不加载,所以本文讨论的是最原始的链接形式的。

下面给出几个常用的在线收藏夹的收藏链接,标题以domety为例,网址以http://domety.com/为例。在具体的使用过程中,只需要把这两个替换掉你自己文章的标题和网址即可。

QQ书签:http://shuqian.qq.com/post?title=domety&uri=http://domety.com/

google书签:http://www.google.com/bookmarks/mark?op=add&hl=zh_cn&title=domety&bkmk=http://domety.com/

百度搜藏:http://cang.baidu.com/do/add?it=domety&iu=http://domety.com/

yahoo收藏:http://myweb.cn.yahoo.com/popadd.html?title=domety&url=http://domety.com/

新浪ViVi:http://vivi.sina.com.cn/collect/icollect.php?title=domety&url=http://domety.com/

乐收:http://leshou.com/post?act=shou&title=domety&url=http://domety.com/

以下是本站的实现代码,以做参考

<?php $title = get_the_title();
$permalink = get_permalink();
$title = urlencode($title);
$permalink = esc_url($permalink);
// QQ书签
$output = '<a href="http://shuqian.qq.com/post?title='.$title.'&uri='.$permalink.'" title="收藏到QQ书签" target="_blank">QQ书签</a>';
// google书签
$output .= ' | <a href="http://www.google.com/bookmarks/mark?op=add&hl=zh_cn&title='.$title.'&bkmk='.$permalink.'" title="收藏到google书签" target="_blank">Google书签</a>';
// 百度搜藏
$output .= ' | <a href="http://cang.baidu.com/do/add?it='.$title.'&iu='.$permalink.'" title="收藏到百度搜藏" target="_blank">百度搜藏</a>';
// yahoo收藏
$output .= ' | <a href="http://myweb.cn.yahoo.com/popadd.html?title='.$title.'&url='.$permalink.'" title="收藏到Yahoo收藏" target="_blank">Yahoo收藏</a>';
// 乐收
$output .= ' | <a href="http://leshou.com/post?act=shou&title='.$title.'&url='.$permalink.'" title="收藏到乐收" target="_blank">乐收</a>';
echo $output; ?>
添加评论

12 条评论

  1. 1 F

    星网

    2010-01-31 星期天 02:03

    我直接调用的分享家。。。

    回复
  2. 2 F

    vela

    2010-01-31 星期天 02:07

    不错,不过css样式不太会弄,添加了,但是在我的网站上看起来好丑啊,
    还有点小问题想请教你,在你qq留言了,有空你帮我看看

    回复
  3. 3 F

    leebird

    2010-02-01 星期一 01:53

    你好ddbug,网站上留言的格式是怎样做到的啊?就是作者的留言不会另起一楼,wp默认的都是另起的……

    回复
    • DDBug

      2010-02-01 星期一 10:14

      你可以使用插件,代码的话一两句话说不清楚,而且还和css有关,等我整理一下写个教程出来好了

      回复
  4. 4 F

    少杰

    2010-02-01 星期一 17:02

    直接收藏到邮箱不是更好。

    回复
    • DDBug

      2010-02-01 星期一 17:18

      这个想法不错,有时间做一个发送到邮箱的链接

      回复
  5. 5 F

    ddd

    2010-02-05 星期五 21:13

    网站备案流程详解

    回复
  6. 6 F

    断桥残雪

    2010-02-06 星期六 08:59

    不错啊,前几天才给我的爱墙每个祝福都加上了RSS订阅,并且可以分享到QQ、校内、开心、百度等~有空可以去看看,http://love.2fool.cn

    回复
  7. 7 F

    zhukun

    2010-02-13 星期六 18:43

    相识一场缘分啊,朋友之间义气啊,发条短信拜年啊,说声问候新年好啊,健康平安第一位啊,福气财气跟上你啊,新年快乐恭喜发财万事如意心想事成啊!清风小荷塘祝朋友们虎年吉祥,虎虎生威,生龙活虎!

    回复
  8. 8 F

    e-shequ

    2010-05-24 星期一 11:34

    你那个文章顶部的个人信息这个是怎么弄的啊!分享下…

    回复
    • DDBug

      2010-05-24 星期一 20:50

      你可以看这篇文章http://domety.com/archives/77/

      回复
  9. 9 F

    美衣衣服装

    2011-02-28 星期一 20:58

    真的很实用。谢谢~

    回复

添加评论