If you love Digg.com you may like my little snippet of code I wrote last night. I was trying to find out how to integrate a “digg it” button into my website, so my visitors can submit a story from my website to Digg.com. I was Googling all over Internet to find some information on how to do just that and guess where I found it? On Digg.it website! I was looking for a script of some kind that would automatically submit my URL, story’s title, and excerpt of the story just in one click. Digg.com has detailed description on how to do that kind of thing so here it is.
There is a variety of good buttons on the website, so you can use any of those just substituting “src” value in the following code:
UPDATE: The code below is no longer working. I have been using this Plugin for long time.
<a href="http://digg.com/submit?phase=2&url=<?php the_permalink() ?>&title=<?php the_title(); ?>&bodytext=<?php the_excerpt() ?>">
<img border="none" src="http://digg.com/img/badges/80x15-digg-badge.png" width="80" height="15" alt="Digg!" />
</a>
CAUTION: the <?php the_excerpt() ?>
should not contain more than 350 characters- the maximum story description allowed by Digg.com.
Enjoy!
There is a wp-plugin for that all you have to do is install and boom! you have a digg button on your site, not just a digg button but a live button which shows you the number of diggs and stuff. check out my site for an example
There is a wp-plugin for that all you have to do is install and boom! you have a digg button on your site, not just a digg button but a live button which shows you the number of diggs and stuff. check out my site for an example