Thursday, June 21, 2007

Digged my blog

I've successfully put Digg This button in every entry in the blog. It took me an hour to investigate all placement possibilities, ended up using the default button (top left big ugly button).

My first try was to put small icon next to "Email Post" icon. I was unable to adjust the margin (the button was not "in line", a little too "upper"), and after given up trying (and accepting the layout the way it is), the front page still displayed the button in its default form (big button)! I don't know why.

After that, I revisited all entries to make sure the addition doesn't screw their layout. I modified some entries to make them look pretty. What a work.

For those who want to put Digg This button in their Blogger, do the following:
1. Open "Template" -> "Edit HTML"
2. Check "Expand Template Widget"
3. Look for "data:post.body" in the code
4. Insert the following code before that element:
<span style='float: left; margin: 6px 6px 6px 0pt;'>
<script type='text/javascript'>
digg_url = &#39;<data:post.url/>&#39;;
digg_bgcolor = &#39;#fff3db&#39;;
digg_title = &#39;<data:post.title/>&#39;;
</script>
<script src='http://digg.com/tools/diggthis.js' type='text/javascript'>
</script>
</span>
5. Save the modified template

I make no guarantee it will work on your page, but it works with me. Feedbacks welcome.

3 comments:

  1. digg itu apa yah, huahhahaa - jhn

    ReplyDelete
  2. i was able to put the code to the right side by simply changing the left to right. :)

    Thanks for the code :) It worked for my blog :)

    ReplyDelete

Looking for my geek side?