Tuesday, September 19, 2006

Add Digg button to a single Blogger post - How to

Here's a hack that will allow you to add a Digg button to each of your
individual Blogger posts
. Btw, I'm referring to the big yellow Digg
button
that displays your articles Digg count + the Digg
it button.

Most of the Digg button tutorials that I've come across show you how to create Digg buttons for your blogs. None that I've seen come up with a good solution for actually displaying the buttons (again, the BIG YELLOW one) on a Blogger blog.

What we need is a way to be able to append a Digg counter to each of our posts - individually. The actual Digg code that's provided at sites like the one above is always in SCRIPT form. Common sense would have us pasting that SCRIPT code directly into the Blogger post where we want our Digg button to go. This, if you've ever tried it, doesn't work. Blogger does not allow the SCRIPT tag in anything other than the Blogger template - which doesn't help us much.

Here's a workaround/solution:

1. Copy this code (Source: http://diggtheblog.blogspot.com).

<script> digg_url = 'URLOFSTORY'; </script>
<script src="http://digg.com/api/diggthis.js"></script>

2. Go find your Digged post URL (chicken and the egg thing - i know...).

3. In the code above, replace URLOFSTROY with your Digg URL.

4. Paste the code from #3 into notepad and save it as an htm/html file. Upload that file to a server.

5. In your Blogger post, the one where you'd like to append the "Digg this button counter", insert the following code:

<iframe src="URL_TO_YOUR_FILE_FROM_#4" frameborder="0" height="115" width="100">&amp;amp;lt;br&amp;gt;</iframe>

6. Now save your post, and publish it!

Here's a live example:


Comments:
Awsome! Thank you!
 
Tom- When you say upload that file to a server, how exactly do I do that? Keep in mind I am not all that tech savvy. Thanks.
 
You need to find some hosting space (preferably free - check with your internet service provider to see if they've allocated a spot for you; they usually do). You need to place the FILE there.
 
Very Nice!
 
can you give a place where we can upload it to
 
Post a Comment

Links to this post:

Create a Link



<< Home

This page is powered by Blogger. Isn't yours?