2008-07-23

Blogging Tip : Add a Digg button



By now, I believe you are familiar with the smart Digg button, it allows you to see whether or not the web page you are currently viewing has been submitted to Digg and lets you submit it if it hasn't. In this quick tutorial, I'll explain how it can be done.

Login to your Blogger Dashboard. Under Settings-> Archiving, set the “Enable Post Pages?” to “Yes” and save the settings.

Back to Edit Html, click the box next to “Expand Widget Templates”.

Press Ctrl+F and type <data:post.body/> in the search box.



And place the below code right before it.
<div style='float:right; margin-left:10px;'>
<script type='text/javascript'>
digg_url=&quot;<data:post.url/>&quot;;
</script>
<script src='http://digg.com/tools/diggthis.js' type='text/javascript'/>
</div>


Or else you may click here to copy the above code.

The example is shown below:-


Save the changes.

2 comments:

HawgWyld said...

This worked for me, but there's one thing to call to your attention -- the "p" tags did not flank the "data:post.body" code in my template (that's the "Rounders" template I got through Blogger).

Regardless, putting in the code you suggested worked like a charm.

I'm an absolute novice at HTML, so the fact those tags weren't present worried me at first. I'm almost certain someone else will be in the same boat.

Great tip and it works like a charm!

The Natural State Hawg

Is said...

Ethan@State Hawg,
The p tag is meant to put a space between items. It acts as a paragraph break :)

Post a Comment

1. Comments posted must be accompanied by names or pseudonyms.
2. Anonymous posting and those containing profanities will be rejected.
3. Comments are moderated due to spam problems. I have to approve the comment before it will show up.

:)) ;)) ;;) :D ;) :p :(( :) :( :X
=(( :-o :-/ :-* :| 8-} :)] :-t b-( :-L