Add Digg button to post in blogger

by Nandupatel on January 17, 2009

With Digg button you can easy to submit your post with your self or with your visitor to Digg.com. Feel interested to add Digg button to your blog?

Here is the steps :

1. Login to blogger account
2. click Layout.
3. Then click edit HTML tab(Don’t forget to download full template)
4. Please mark the little box beside Expand Widget Templates.
5. Go to your template code, and find the code like this :

<p><data:post.body/></p>

7. Delete the code above and alter with following code :

<p>
<!– DIGG –>
<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>
<data:post.body/>
</p>

8. Click Save Template button.

9. You are Done
This is for original template, how about template which were modified with Read more function as me. You must change your read more code with this :

<b:if cond=’data:blog.pageType == “item”‘>

<style>.fullpost{display:inline;}</style>

<p>

<!– DIGG –>

<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>
<data:post.body/>

</p>

<b:else/>

<style>.fullpost{display:none;}</style>

<p>
<!– DIGG –>
<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>
<data:post.body/>
</p>

<a expr:href=’data:post.url’><b>Read More…</b></a>

</b:if>

Save your template and done.

Leave a Comment

Previous post:

Next post: