ブログにブックマークボタンを表示させるタグをメモ。


リニューアル作業を着々と進めていますが、以下ソーシャル・ブックマークのボタンをindex.htmlやentry archive、category archiveなどに導入しました。


その手順についてメモ。


画像をDL。


まずはdel.icio.usはてブのボタンの画像をDL、適当なディレクトリに保管します。僕はmt staticの中のimageフォルダに保管しました。ちなみにdel.icio.usはてブのこの画像を保管しているパスに直リンクしても表示はされますが、はてブはしっかりと自分のサーバーに保管する旨唱われているので。del.icio.usはポリシー不明なため。



はてブボタン

http://d.hatena.ne.jp/images/b_entry.gif



del.icio.usボタン

http://del.icio.us/static/img/delicious.med.gif 


モジュール化するとのちのち便利。


そして以下タグをモジュール「bookmark」として保存。モジュール名はご任意に。ちなみにブックマークボタンを新たに追加する際に便利なのでモジュール化しています。また、<!---画像を保管したURL---!>をdel.icio.usはてブの2カ所、ボタンの画像を保管したURLに差し替えてください。


 
<li><a href="http://del.icio.us/post?url=<$MTEntryPermalink$> &title=<$MTEntryTitle encode_url="1"$>" target="_blank">
<img src="<!---画像を保管したURL---!>" style="border: none;"
alt="del.icio.usに登録する" height="12" />
</a></li>
<li><a href="http://b.hatena.ne.jp/entry/<$MTEntryPermalink$>">
<img src="<!---画像を保管したURL---!>" width="16"
 height="12" style="border: none;" alt="このエントリーを含むはてなブックマーク"
 title="このエントリーを含むはてなブックマーク" /></a></li>
<li>
<a href="javascript:void window.open('http://bookmarks.yahoo.co.jp/bookmarklet/showpopup?t='+encodeURIComponent(document.title)+'&u='+encodeURIComponent(window.location.href)+'&opener=bm&ei=UTF-8','popup','width=550px,height=480px,status=1,location=0,resizable=1,scrollbars=0,left=100,top=50',0);"><img src="http://i.yimg.jp/images/sicons/ybm16.gif" width="16" height="16" border="0" alt="Yahoo!ブックマークに登録"></a></li>
<li><a href="http://clip.livedoor.com/redirect?link=<$ArticlePermalink$>&title=<$BlogTitle URIESCAPE$>%20-%20<$ArticleTitle URIESCAPE$>&ie=euc" class="ldclip-redirect" title="この記事をクリップ!"><img src="http://parts.blog.livedoor.jp/img/cmn/clip_16_12_w.gif" width="16" height="12" alt="この記事をクリップ!" style="border: none;" /></a> <a href="http://clip.livedoor.com/page/<$MTEntryPermalink$>"><img src="http://image.clip.livedoor.com/counter/<$MTEntryPermalink$>" border="0"></a></li>
<li><a href="http://buzzurl.jp/entry/<$MTEntryPermalink$>" title="Buzzurlにブックマーク" target="_blank"><img src="http://buzzurl.jp/static/image/api/icon/add_icon_mini_01.gif" alt="Buzzurlにブックマーク" border="0"></a><a href="http://buzzurl.jp/entry/<$MTEntryPermalink$>" title="Buzzurlにブックマーク" target="_blank"><img src="http://api.buzzurl.jp/api/counter/<$MTEntryPermalink$>" alt="Buzzurlにブックマーク" border="0"></a></li>


あとはお好きな場所へ!


そしてでき上がったモジュール<$MTInclude module="bookmark"$> をindex.htmlやentry archive、category archiveに入れます。僕はエントリーの下がよかったので、<div.=content>の中に入れています。以上でかんせーい!


こぼれ話


しかしYahoo!ブックマークはまだサービスインしたばかりなのに、そこそこ盛り上がっているみたいですね。実質別会社なので、期待は全くしていませんが、del.icio.usの日本語版が出ないかなぁ。