How to add a Digg This counter to your article

Simply by adding the HTML below to this page...

<script>
digg_url = 'http://digg.com/programming/How_to_add_a_Digg_This_link_to_your_web_site';
</script>
<script src="http://digg.com/api/diggthis.js"></script>

Hope this is useful to diggers out there

Alternatively.....


<p><iframe 
src="http://digg.com/api/diggthis.php?u=http%3A%2F%2Fdigg.com%2Fprogramming%2FHow_to_add_a_Digg_this_link_to_your_article" 
frameborder="0" height="82" scrolling="no" width="55"></iframe></p>

They both result in the same output, but I prefer the first as you don;t have to play with the URL.

Author Dave Howard

I have been involved in IT development for the last 10 years - a lot of it around desktop applications and telecoms.

Comments

Paul Hayman said:

Another Way:

<script>

digg_url = 'http://digg.com/programming/Integrating_Dojo_Fisheye_and_SiteMapDataSource';

</script>

<script src="http://digg.com/api/diggthis.js"></script>

21/Sep/2006 09:01 AM

pagem said:

Any idea why the javascript null link which results in an error from the 'digg it' button?

I get the same error on the code I use.

Of course better still if the content engine generates the code for you by default

22/Sep/2006 16:03 PM

Add Comment

Name
Comment
 

Your comment has been received and will be shown once it passes moderation.