Adding Articles to Digg
I wanted to be like most of the cool kids with cool blogs and make it easier for everyone to spread the word about any awesome articles or podcasts that I put out there. So, the easiest way to get this accomplished is to add the little link on the page so that when you click it, all you have to do is login to Digg, add the summary and category stuff and you’re done! Pretty easy, huh?
It’s not really any nasty code at all when you think of it, just some basic PHP. Since I found the code off of a tutorial, I’ll save everyone the time and just post it here. You’ll need to change your domain name to match yours, but other than that is should come ready to work right out of the box. I chose to use an image instead of a regular text because I found a new font that I liked and wanted to spice the site up a bit. So the image below is used in place of just a regular text link.
![]()
The Code
<a href=“http://digg.com/submit?phase=2&url=<?php echo urlencode(“http://www.macfanatic.net” . $_SERVER["REQUEST_URI"]); ?>”>Digg This Article</a>
If you’re going to use this with WordPress, you’ll want to add this in your “comments.php” file in your theme. The advantage to this is that the little script actually works, but the link won’t show up when people subscribe via RSS, only when the fully read your article at it’s specific permalink address. Hey, life’s not perfect, I’m up for suggestions.














Submitting Your Comment, give me a second...