Measured Against Reality

Thursday, September 21, 2006

Add Social Bookmarking to Your Blog

I have been searching for a way to add a “Digg This” link to my blogger blog for some time now. I had one that worked for a while, but suddenly stopped a few weeks ago. So I decided to take it into my own hands and cobble something together that just works. It’s not fancy, and it won’t magically fill out all the forms for you, but it does work. I also added most other social bookmarking sites, such as Reddit and

Just copy and paste the following into your template, wherever you see fit. I put mine in the post footer (hence the class=”post-footer” in the p tag), but it could go anywhere.

<p class="post-footer">Send this post to:
<a style="float:none;" href="javascript:location.href='* url='+encodeURIComponent('<$BlogItemPermalinkURL$>')">Digg</a> |
<a style="float:none;" href="<$BlogItemPermalinkURL$>* &title=<$BlogItemTitle$>">Reddit</a> |
<a style="float:none;" href="<$BlogItemPermalinkURL$>* &title=<$BlogItemTitle$>"></a> |
<a style="float:none;" href="<$BlogItemTitle$>* &url=<$BlogItemPermalinkURL$>">Spurl</a> |
<a style="float:none;" href="* <$BlogItemPermalinkURL$>">Ma.gnolia</a> |
<a style="float:none;" href="<$BlogItem* PermalinkURL$>&h=<$BlogItemTitle$>">Newsvine</a></p>

For formatting reasons, I had to put spaces into the code where they wouldn't typically appear in the URLs, marked by a *. You'll have to get rid of those for the code to work.

You can tweak it to fit your tastes, all the different sites work independently (obviously). And if there’s someone out there who could improve this, please do (or anyone who can write a "copy to clipboard" script that works in all browsers). This seems to be something people want, and I can’t find a working version anywhere (except here!).

I hope this gets all your posts a few more hits, and glad I could help.

Labels: , , , , ,


Post a Comment

Links to this post:

Create a Link

<< Home