Wednesday, December 5, 2007

Add Digg To Blogger.com Posts


After a poking around the xml template for my site, and playing around with the Digg code, I've figured out how to add a Digg button to my posts.
Listed below is a quick how-to for adding this functionality to your website too.



  1. Make sure your blog is set to enable Post Pages and you are using the new Blogger, not the classic version

  2. Go to the customization section of your blog, on the Template tab select Edit HTML

  3. Make sure to click Download Full Template and save a backup copy to disk - just in case.

  4. Put a check in Expand Widget Templates.

  5. Search for <p><data:post.body/></p>
    Update: November 5th, 2008

    It has come to my attention that some templates use a slightly different formatting. If you cannot find the text listed above - try searching for <data:post.body/> and follow the rest of the instructions.

  6. Paste this on the line directly 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>

  7. Preview your template to make sure it looks right - the Digg icon should appear at the top right of all your posts. Hover your cursor over it and make sure the link URL matches your post URL.

  8. If all looks well, click Save Template and then View your blog


Happy DIGGing!

89 comments:

http://template-godown.blogspot.com said...

hi brian, good work.

i'll put this post on my blog,


http://template-godown.blogspot.com


thank you

Michelle said...

Thanks, Brian! Already put your genius to good use!
http://missmotamouth.blogspot.com/

Brian Cantin said...

Glad to be of service, and hey, feel free to DIGG this post or link to me if you liked it. ;)

tukang.gudang@gmail.com said...

hi brian, thanks for your comment-back. actually i put a link already, on your name [brian cantin] and words [his step].
but it's now updated by adding a footer linking to your page.
sorry for the inconvenience.

regards,

william said...

Thanks alot for the info. I managed to add Digg to my blog. It's at slackogamer.blogspot.com

Martin said...

Worked perfect. Thanks!!!

dailyphotographer said...

Hey this is great, worked perfectly. I posted the code in my blog
http://photographyperdiem.blogspot.com

Thanks very much! your good!

Google helper said...

great it's working fine awesome buddy

3 n' 30 said...

Out of all the sites I went looked at to get the Digg button on my site, yours is the only that has worked for me.

bedmo said...

Thank you verry much my freind. I add it to my blog its verry cool. see it
http://computers-maintenance.blogspot.com

Have a nice day.

Donavon West said...

You're a good man, thanks. Added to HomeServerHacks.com.

American Goy said...

And I was dumb enough to add it to each post...

Stupid stupid stupid...


Thanks!

Brian Cantin said...

"And I was dumb enough to add it to each post..."

I was going to do this and figured there had to be a better way... Going through all my posts and manually linking them seemed rather daunting.
Not to mention I am rather forgetful and lazy - so remembering to add it to each post seemed troublesome.

American Goy said...

I put in both digg it and reddit button short and sweet tutorial

and

I gave my html code on how to do it if anyone is interested

http://americangoy.blogspot.com/2008/01/housekeeping-digg-it-and-reddit.html

Paul said...

Thanks for the useful advice, always appreciated.

QuickExtenderPro

SSTRM said...

Thank you very much for this advice, Your method is so simple yet effective. Double thank you!

Anonymous said...

Thanks for this! I'll be implementing this on my blog:

http://gametheoryonline.blogspot.com/

Chris said...

Right on. Worked Great! BTW Google presented you up top.

http://blog.anzelonline.com/

J W said...

Great! This is really a brilliant hack! Thanks. I have added this in my blog at Man Fashion

Cheers

X4 Penis Extender said...

Great and useful advice, this was rea good for me.

Hot G Vibe Cock Ring said...

Thx Brian, I am going to put all your great ideas to use.

Anonymous said...

actually the idea is not genuine anymore, i believe it's taken from http://tips-for-new-bloggers.blogspot.com/2007/03/add-digg-button-to-blogger-or-blogspot.html

Brian Cantin said...

I'm not sure what you mean 'not genuine anymore' - this still works just fine, as seen on all my pages.
I see that the listed link does not directly work, however, regardless of when that was posted - it was not readily available at the time I wrote mine, otherwise there would have been no point in the first place.

Costa said...

Many thanks! I wanted to put my digg at the bottom of each post, so I pasted the code a few lines down, after the last line in the post-footer code (it's the data post timestamp on mine) and before the /b:if line. Thanks again.

dave said...

Thanks!
Added sucessfully to http://www.whatanexperience.org.

chitgoks said...

I placed your post in my blog. I', not sure if this happened to any one of you. when i submit a post to digg using that icon, it always gives out an error. Anyone experienced this?

Waxed said...

WooHoo! Working like a dream :)


Lester
lesterhein.blogspot.com

Jeffrey Diana said...

thanks for the help. i really wanted to put a "digg" link on my posts.. nice post! very helpful!

http://jeypriey.blogspot.com

ifrim said...

nice work. tkank you my blog is http://ifrim3.blogspot.com

Just a Money Maker said...

Thank you. Digg is working perfect on my blog!


http://justamoneymaker.blogspot.com/

B and T Crowd said...

Your post is the post that keeps on giving! Thanks! I don't understand why it was so hard to find such simple directions. I can only imagine what your visitor count is up to.

MaT said...

very useful script, thanks for that
i used it in my blog

J. Thomas Hunter said...

THIS WAS GREAT!Thank you so much for providing this information. With a little bit of patience, I found the prompt.

Vinod Tonangi said...

For some reason this WAS working, but today it completely stopped working. I even tried to change to a default template again, and redo it. I see when it loads up it is contacting digg.com but I can't see anything - anybody know why? please let me know

Vinod Tonangi said...

fyi - if you look at www.bigredmat.com you will see that the new reddit works just fine, so I don't understand why the digg one won't work...

Jacque Rowland said...

Awesome Thanks Brian!!!

Anonymous said...

many thanks
i added to my blog http://ccna-test.blogspot.com

tambelan said...

perfect tips. i added in my blog now :) thanks a lots.

Nicholas said...

all this does for me is removes all my posts and leaves a bunch of digg buttons :/

nickandlena.com

Anand Rao said...

Super Cool Dude! Thanks

http://anand-mind-spark.blogspot.com

I will Digg this post!

Hari said...

Thanks a ton. was waiting for this

www.hithari.com

EverybodyGeek said...

Thx alot! This was exactly what I needed. And you can even customize the digg button!

Admin said...

thanxs a ton Brian. It worked for my blog. Appreciate your hard work.

Incomebooster.org said...

Thx, just added to
http://wfhmedia.blogspot.com/

koushik said...

Nice hack ...just added to

http://future-gadget.blogspot.com/

Brian Cantin said...

Just a note to those who where having unexpected results - make sure you are in fact running on the new blogger and are not using blogger hosted on an external site. Be very careful to insert the code exactly where stated, otherwise things may explode. I missed a line of code trying it out and my toaster caught fire - you really need to watch closely.

Kazi said...

I can't find the html tag u mentioned
in the edit html template.

TechPrism : RIDDHI MOHAN said...

Nice,,,Work,,
I had implemented thi on my blog,,

http://techcolors.blogspot.com

Pinoybooters said...

can you help me?? I already added it but its not appearing, is it my template? I have a chat box there please help me http://yahoo-nukers.blogspot.com/

chantix said...

While taking dosages of the Pfizer’s anti-smoking medicine chantix, you might encounter certain Chantix side-effects such as vomiting, headache, nausea, gas et al but if you continue with the medication without paying heed to the side-effects, it would definitely yield results in the long run. Just log in to http://www.chantixmagic.com and acquaint yourself with the tidbits on Chantix side-effects.

Sex Toys said...

This is some great information!!! Will see if it will help me with my Online Sex Toy Site.

Penis Extender said...

Will defiantly use this information for my site that provides Penis Extender for people that suffer from Peyronie’s Disease and are looking for treatment.

Anonymous said...

Thanks man. I added it in my blog (http://www.coderambles.com). Is there any way to pass title and description to digg?

dc said...
This post has been removed by the author.
dc said...

Thanks Brian.
http://jibbingtheweird.blogspot.com
check it out for all your news of the random

qarla☺ said...
This post has been removed by the author.
qarla☺ said...

tnx, it helped me a lot for my website

http://www.sassyqarla.com/

kankuro said...

hello brian i like your blog there are plenty of nice and helpful article you write.

A Simple Kind of Something

maybe we can have some link exchange. I already add your blog to mine. thanks a lot for a wonderfull and great article of yours.

Dong said...

Excellent!

This was just what I was looking for to allow visitors to my blog to Digg it if they so felt the need.

Thanks!

I also have it running at http://dotdong.blogspot.com if anyone wants to see it working.

Yank in Ulster said...

Thank you kindly for your tips. Took me a while to tweak the placement, but I prevailed. Here is my digg code in my Blogger template. The important bits are in between the first and last lines. For me, I wanted the digg icon to be on its own line, at the footer of each Blogger posting.

(Replace parentheses with pointed brackets)

(div class='post-footer-line post-footer-line-3')(span class='post-location')
(b:if cond='data:post.url')
(script type='text/javascript')
digg_url='(data:post.url/)';
digg_bgcolor='#c3d9ff';
digg_skin='compact';
digg_window = 'new';
(/script)
(script src='http://digg.com/tools/diggthis.js' type='text/javascript'/)
(/b:if)
(b:if cond='data:top.showLocation')

Jonny said...

Hey Brian,

Thx a lot, this helps a lot. I've been trying to add my favourite Sex Toys to my digg list but now i think i can do it!

Cheers

Sacha said...

Hi,

I've tried using it but i'm not quite sure why it isn't working... i guess i'll be better off looking for a Penis Extender instead. Thx for the help anyways, maybe it will work later on for me!

Pearl said...

Hi Brian,

I have been searching and searching, but I cannot find an answer to my question about the Digg button. Perhaps you might have one for me. I have the code set with (data:post.url) so that each post has a Digg button and can be submitted separately; however, when I click on the button, it takes me to a page where I am given an option to add a title and description and the link there is my blog url, not my post url. Any idea how to fix this?

Thank you,
Pearl

Pearl Diver

ArtBoon said...

I have the same problem like Pearl...

http://arthurboon.blogspot.com/

ArtBoon said...

managed to replace them with smaller digg button after reading the post above

Anonymous said...

Thanks...keep up the good work.

http://e-booksheaven.blogspot.com/

Pinoy IN Germany said...

Thanks. just what I am looking for.

looking good with my blogs ^_^

http://pinoyingermany.blogspot.com

http://techmata.blogspot.com

Harjot Doad said...

http://rhahfa.blogspot.com
road to health and health for all - one of the best blogs

edward ng said...

thanks ..
done.. http://www.technu.co.cc

Josh Meyer said...

Thanks Brian. Worked like a charm.

Anonymous said...

Thanks a lot for sharing.
http://blogcrack.com

Brunetto said...

Excelent! Thank you!

manchestersquare said...

Brian, thank you for this article, trying to move my blog into the 'modern' age. Will give it try, definitely!

http://manchestersquare.blogspot.com

Romeo PHP said...

thanks, that was great !

Kathy Crabbe said...

Thank You Brian!!!!!!!

I have spent about an hour trying to find the code but one of the comments on your site helped me find it finally!

Steve said...

Thanks! Works a treat!

mygadgetlife.blogspot.com

ipannapi said...

nice one!
thanx dude..
totally digg it!

http://moscow-english-bookstore.blogspot.com

D. Patrick Caldwell said...

Awesome! Thanks a lot. I used your script (with a few modifications) and added several scripts of my own. If you'd like, you can find them on my blog.

Oufzr57 said...

Thanks ;)
Working great!

Gerard Banhidi said...

Thanks for the tip!

It is working nicely in my page.

http://www.durkhrodchogori.com/

The Team @ One Physique said...

Thanks for the tip!

http://www.onephysique.com

silentcon said...

Easy instruction!

Do I Have Swine Flu? said...

Thanks so much for posting this! Much appreciated. Now to get more people to Digg my posts! :)

NatE said...

I spent about a half hour looking through html code and still didn't find what i was looking for but then went to the trusty google search engine and found this. Nice work and thanks

Learn by Laughing said...

I use the same method - not sure if I got it from you originally or not but I've given this blog a mention at:

http://onlinemoneytester.blogspot.com/

one Teacher said...

thnks a lot addes in my blog get-insurance4health.blogspot.com

Anonymous said...

thanx, check out foodiesdelhi.blogspot.com, for great food in delhi.

Amit said...

thanx, check out http://foodiesdelhi.blogspot.com, for great food in delhi.

naveen.sprihaa said...

its awesome.....thanq

htttp://www.sprihaa.blogspot.com

Post a Comment