
Would you like to drive more traffic to your Drupal website? This is a Drupal PHP snippet that will generate social bookmarking links for your blog nodes. It builds a list of social bookmarks for the current blog node. Use this as part of your custom Drupal theme by inserting this into node-blog.tpl.php file.
Here is an example of how to use this Drupal snippet:
";
<?php
echo "
?>
Here is the social bookmarking code snippet: EOD;
<?php
function BuildDeliciousLink($node_url, $title, $directory) {
$urlLink = urlencode("http://del.icio.us/post?url=http://www.yoursite.com{$node_url}&title={$title}");
$link = "
Del.icio.us";
return($link);
}
function BuildDiggLink($node_url, $title, $directory) {
$urlLink = urlencode("http://digg.com/submit?phase=2&url=http://www.yoursite.com{$node_url}&title={$title}");
$link = "
Digg";
return($link);
}
function BuildTechnoratiLink($node_url, $title, $directory) {
$urlLink = urlencode("http://technorati.com/cosmos/search.html?url=http://www.yoursite.com{$node_url}&title={$title}");
$link = "
Technorati";
return($link);
}
function ShowBookmarks($node_url, $title, $directory) {
$linkDelicious = BuildDeliciousLink($node_url, $title, $directory);
$linkDigg = BuildDiggLink($node_url, $title, $directory);
$linkTechnorati = BuildTechnoratiLink($node_url, $title, $directory);
$strOut =<<
return($strOut);
}
?>
Here are the social bookmarking badges. Please do NOT reference the images off this site. Simply right click and save the social bookmarking images to your server and reference them from there.
del.icio.us - 
Digg - 
Technorati - 