Ajax software
Free javascripts
↑
Main Page
Digg Button Plugin
Adding a Digg button to your site can encourage visitors to digg an article that has already been dugg. This
plugin has been presented at
http://www.seoegghead.com/blog/seo/how-to-get-dugg-digg-for-
wordpress-plugin-p113.html
. There you can also see how the Digg button looks in practice — see
Figure 16-15.
Figure 16-15
To add the Digg button to your blog, follow these steps:
1.
Create a file named
digg-button.php
in your
/blog/wp-content/plugins
folder,
and type the following code. Alternatively, you can pick up the code from the book’s
code download.
<?php
/*
Plugin Name: Digg
Plugin URI: http://www.seoegghead.com/
Description: Creates an interactive Digg button.
Author: Jaimie Sirovich
Version: 1.0
Author URI: http://www.seoegghead.com/
*/
function _scrape_check_digg($digg_link, $the_permalink)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $digg_link);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$http_result = curl_exec($ch);
304
Chapter 16: : Creating an SE-Friendly Blog
c16.qxd:c16 11:04 304
Ajax software
Free javascripts
→