• Home
  • New Entries
  • Popular Entries
  • Submit a Story
  • About

How to show digg score in Wordpress ...

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

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

 View Full Story.
Posted at 11:54:24 am | Permalink | Posted in Digg  

Related Stuff

Improving security in Wordpress plugins using Nonces

Using 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 Plugins

This 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 Community

Growing your blog beyond publishing can be done quite easily by using WordPress Forums Plugins. Community growth greatly depends on ongoing ...

5 Annoying WordPress Plugins

Usually 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 Wordpress

The 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


Top Stuff

Free Blogger templates Anime Themes

Wordpress Guestbook Generator Plugin

GeekLog

Zookoda

Introduction to blogs and blogging

jumpcut


Our Partners

Facebook Applications

Ajax Projects

Web 2.0 Sites

Webloglines

Human Development Handbook

Software Development Company

Ajaxlines

Stock Exchange Chat


About Webloglines

Webloglines is a project offers a comprehensive collection of blogging services, articles, themes and plugins from around the world. Whether you're looking to promote your own blog or find blogs on various topics, this site is for you.


Search


Topics

  • Adsense (9)
  • Blogging Tips (59)
  • Blogs Slides (25)
  • Blogs Websites (22)
  • Digg (8)
  • How to Blog (65)
  • Search Engines (2)
  • SEO (40)
  • WordPress Plugins (88)
  • WordPress Security (28)
  • Wordpress Themes (36)
  • Wordpress Tips (56)

© 2006 www.webloglines.com. All Rights Reserved. Powered by IRange