How to Link a Site to Digg
You can use the Digg button to link your website to Digg.com. Visitors will see a Digg button they can click, which also displays the number of Diggs your page has already received. Linking your site to Digg allows visitors to quickly share your content on Digg, exposing it to the Digg community and, potentially, increasing your website’s traffic. The Digg button consists of a small JavaScript file you can load from your page and a button code you can add anywhere on your page.
Instructions
-
-
1
Open your Web page’s HTML source code in a text editor.
-
2
Add the following code between the “<head>” and “</head>” or “<body>” and “</body>” tags in your source code. You can reduce load time by adding the code as close as possible to the top of the file.
<script type="text/javascript">
(function() {
var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];
s.type = 'text/javascript';
s.async = true;
s.src = 'http://widgets.digg.com/buttons.js';
s1.parentNode.insertBefore(s, s1);
})();
</script> -
-
3
Add a Digg button by including the following code in the location on the page where you want the button to appear:
<a class="DiggThisButton DiggMedium"></a>
-
4
Replace “DiggMedium” in the code with “DiggWide”, “DiggCompact” or “DiggIcon” if you want to use a wide button, compact button or small icon instead of the medium button.
-
5
Save your Web page’s HTML file and upload it to your Web server.
-
1
Tips & Warnings
You can add additional properties to the button code. For example, the code “<a class="DiggThisButton DiggMedium" href="http://digg.com/submit?url=http%3A//example.com"></a>” causes the button to submit “example.com” to Digg instead of the current page. Replace “example.com” with any address you want to Digg. You can use this to have a single Digg button for your entire website instead of one for each page, or just to have the Digg button submit a different Web page.