Thursday, April 3, 2008

How to add Digg code to blogger/blogspot in HTML?

After lot of googling and site searching finally i found ways of putting digg button code in blogger HTML code. Finally i have Digg widget in my blogger

See below on how to add Digg widget to your blog.

1) Get a Blog :)
2) I hope you are on new blogger and not classic and is set to enable Post Pages
3) Select 'Layout' on your blog, and then select 'Edit HTML'
4) What if something goes wrong and you dont want to mess up your existing template click 'Download Full Template' and save a backup copy of html code
5) Select checkbox 'Expand Widget Template'
6) Search for

<p><data:post.body/></p>
in your html code

Paste this on the line directly before it:
For regular Digg button with counts


<div style='float:right; margin-left:10px;'>
<script type='text/javascript'>
digg_url="<data:post.url/>";</script>
<script src='http://digg.com/tools/diggthis.js' type='text/javascript'/>
</div>



And for a compact digg button


<div style='float:right; margin-left:10px;'>
<script type='text/javascript'>
digg_url="<data:post.url/>"
digg_bgcolor = '#ff9900';
digg_skin = 'compact';
digg_window = 'new';
</script>
<script src='http://digg.com/tools/diggthis.js' type='text/javascript'/>
</div>



7) Preview your template to make sure it looks right
8) You Digg button should be on the right of each and every post of yours
9) If it looks good to you in the preview, save your template
10) Viola !! you have successfully installed Digg widget in your blogger

Enjoy!!

No comments: