今天看到幫部落格加上Plurk快速噗文按鈕這篇文章,也試著把自己的Wrordpress中加入文章轉噗按鈕。
方法就是在文章中加入一個超連結,網址格式為:
http://www.plurk.com/?qualifier=shares&status=文章URL (文章標題)
- shares代表轉噗時的「修飾詞」為「推」,也可以改成其他的修飾詞,如says(說)、likes(喜歡)等等。
- 文章URL (文章標題) ,這格式如同在噗文時用的超連結格式。
在原文中提到加入wordpress的連結網址為:
http://www.plurk.com/?qualifier=shares&status=http://你的部落格網址/?p=<?php the_ID(); ?> (<?php the_title(); ?>)
其實網址的部份可以利用wordpress提供的the_permalink()函數來取得目前文章的網址,並不需要自己輸入wordpress會自動取得,因此網址應為以下即可:
http://www.plurk.com/?qualifier=shares&status=<?php the_permalink(); ?> (<?php the_title(); ?>)
所以在wordpress中可以把以下簡短語法加入樣板中,以後發文就會自動出現轉噗按鈕了:
<a title="把這篇文章分享到你的噗浪中" href="http://www.plurk.com/?qualifier=shares&status=<?php the_permalink(); ?> (<?php the_title(); ?>)" target="_blank"> <img src="你的圖片網址" alt="把這篇文章分享到你的噗浪中" /> </a>





五月 30, 2009 at 7:22 上午
果然很方便,馬上轉到噗浪上去!
六月 1, 2009 at 4:02 上午
不錯用,馬上拿來使用,轉貼新文很方便^_^
六月 9, 2009 at 12:38 下午
[...] 噗浪按鈕,作法我是參考「色胚子部落」的方法,有興趣妳也可也去看看!! <!——-Plurk噗浪推文 [...]
六月 29, 2009 at 11:35 下午
[...] 噗浪按鈕,作法我是參考「色胚子部落」的方法,有興趣妳也可也去看看!! <!——-Plurk噗浪推文 [...]