Last night I did a bit of moddingÂ to my site (to my blog theme). For yesterday’sÂ Dell Mini 9 post I was interested in tracking my traffic. IÂ was also interested in using that subject to generate as much traffic as possible. So today and tomorrow I’m posting about two wordpress plugins that I added, tomorrow’s is to help get an idea of traffic, and today’s is to add the Digg icon to a post – which you see here to the right.
The reason I’m calling these ‘mods’ is that they were a little more difficult to install than a regular wordpress plugin and each required me to edit (modify) code.
In searching for a way to integrate Digg into my WordPress theme I first found a couple of plugins which will automatically add the icon to every post in your blog. Â Then I found this article which basically says that WordPress already supports it and that all you have to do is add a [digg=…] tag. Well, after about 20 minutes of trying I realized that there is a difference between WordPress.com and WordPress.org. Â My blog is a WordPress.org site, meaning that I’m using their free software and it is hosted on my own server, not the WordPress.com servers. Â Therefore, the Digg integration mentioned in that article didn’t apply to me because I didn’t have any plugins to support it.
As I said, one of the plugins I found puts a Digg icon on every post in your blog. I guess it depends on how you view things, but I would rather have the ability to add a Digg whenever I feel that it’s appropriate. Not all of my posts are Digg worthy. HM2K.com has a plugin called Digg This which emulates the WordPress.com functionality so that you can use a Digg tag for integration on your WordPress.org site. It also allows you to add a digg icon that refers to a different article. Â So if you’re posting about another article you can digg theirs instead of yours.
The problem is that HM2K doesn’t supply a link to the actual plugin. Instead they supply the source code, and give instructions on how to copy and paste it into your own PHP file and install it. Â I followed these directions but their source code, because it’s on a web page, had non-standard quote marks and symbols which caused the plugin to crash. Â I’ve since fixed it all and have posted an easier to install version of theÂ Digg This plugin on my site for easy access. Â Since HM2K is the actual author, if they come out of the woodworks I’ll comply with whatever. But for now I’ve posted it for yourÂ convenience.
UPDATE 12/3/08 – HM2K has finally posted it on their site and asked me to take down my version which I’ll gladly do. The above link now just takes you to the HM2K site – if you scroll down you’ll see the link.
To use it download the plugin, unzip it and place it in your wordpress plugin directory (ie: /home/user/public_html/wordpress/wp-content/plugins/). Then log into the wp-admin area, and activate it under the plugins section.
To use it simply put a [digg=….] tag somewhere in your post, where …. is replaced with a link to the actual digg post. Â Then you’re good to go. Â In this post the digg tag looks like this:
It can become a chicken and egg dellima because your Digg can’t be done until after your post is written, and you can’t add the digg tag to your post until after you’ve Digged it. Â Just write the post, Digg it, wait about 5 min for the digg to post, copy the URI for the digg page, then go back and edit your post and add in the digg tag.
ANOTHER UPDATE 12/3/08 – I now use feedburner which give me the “Digg This! (4 Diggs)Â â€¢Â Share on FacebookÂ â€¢Â Email this” at the bottom of each post. Â Still, I like having both options so that when I’ve got something that it a hotter topic I’ll still sometimes use the Digg This Plugin so that you also see the Digg icon at the top of the post. Â Both seem to work fine together.
7 thoughts on “Digg Integration for WordPress”
You should try feedburner.
Thanks for the advice. I’m looking into FeedFlare again and might add the FeedBurner plugin. I had signed up a while ago and couldn’t make sense of it. It’s a little clearer now.
Nonetheless, it was good for me to dig into the PHP code a bit and see what I could figure out. I’m moving back towards being a coder, and it felt good to get it working even though I don’t really know PHP.
hi, thanks for advice, i will include this function in digg digg future release
mkyong.. I did try digg digg. One of the things I liked about it was the ability to choose between the full size Digg icon and the smaller one.
Noah, I finally figured out how to use FeedBurner and the line at the bottom of my posts that says “Digg This! (2 Diggs) * Share on Facebook * Email this” is something called FeedFlare, which is a part of feedburner.
Again, it requires you to mod your theme PHP files, but I’m getting to be quite comfortable with that now.
Michael, I've added a direct link on my site to download it now, you may remove your download. Thanks for the coverage.
Cool thanks… can you post the link to it here.. I've changed out my link so that it just goes to your site.. One recommendation, make it a .zip. posting a php for download gets weird because the browser might just execute it instead of downloading it. Right?
Excellent site, keep up the good work
Comments are closed.