If you can edit theme files, you can easily automate adding digg score to the posts. Edit index.php and single.php and add the following code to the Loop:
<?php if ( get_post_custom_values(”digg”) != 0) {
$metadigg = get_post_custom_values(”digg”);
echo “<script type=”text/javascript”>
digg_url = ‘”.$metadigg[0].”‘;
digg_bgcolor = ‘#999900′;
digg_window = ‘new’;
</script>
<script src=”http://digg.com/tools/diggthis.js” type=”text/javascript”></script>”;
} ?>
Next, after submitting a post to digg.com, copy the url of the post on digg.com. Edit the post. Scroll down to “Costum Fileds” and add key “digg” with value equal to the url on digg. For example, url of this page on digg.com is: http://digg.com/software/How_to_show_posts_digg_score_in_Wordpress
so I should add key “digg” with value “http://digg.com/software/How_to_show_posts_digg_score_in_Wordpress”. Save and publish the post. Now, you should be able to see digg score of your post.
To show a compact version of the digg score icon, use the following code instead:
<?php if ( get_post_custom_values(”digg”) != 0) {
$metadigg = get_post_custom_values(”digg”);
echo “<script type=”text/javascript”>
digg_url = ‘”.$metadigg[0].”‘;
digg_bgcolor = ‘#999900′;
digg_skin = ‘compact’;
digg_window = ‘new’;
</script>
<script src=”http://digg.com/tools/diggthis.js” type=”text/javascript”></script>”;
} ?>
source: yazaq
Related Stuff
Improving security in Wordpress plugins using NoncesUsing a nonce (number used once) is the best way to protect your plugin against a cross-site request forgery (CSRF) hacker-attack. Nonces ...
10 New WordPress PluginsThis plugin enable admin to put up a splash page to show that the site is down for maintenance. Come with a timer to tell how long the site ...
WordPress Forums Plugins To Build CommunityGrowing your blog beyond publishing can be done quite easily by using WordPress Forums Plugins. Community growth greatly depends on ongoing ...
5 Annoying WordPress PluginsUsually I attempt to share useful WordPress information but today, I thought we could have some fun with 5 of the most annoying WordPress ...
New releases for jQuery and WordpressThe jQuery Database plugin takes your HTML tables and allows you to write a query against them similar to MS- or mySQL. I haven’t had ...
Be the first ... |Add your comment.
Your Comment ...
Name (required)
Email (required, hidden)
Website
