Verizon cell phones

Social Bookmarks

Drupal logo
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.


Usage

Here is an example of how to use this Drupal snippet:


<?php
echo "

Bookmark: " . ShowBookmarks($node_url, $title, $directory) . "

";
?>

Code Snippet

Here is the social bookmarking code snippet:

<?php
function BuildDeliciousLink($node_url, $title, $directory) {
$urlLink = urlencode("http://del.icio.us/post?url=http://www.yoursite.com{$node_url}&title={$title}");
$link = "Delicious logoDel.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 logoDigg";
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 logoTechnorati";
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 =<<

  • {$linkDelicious}
  • {$linkDigg}
  • {$linkTechnorati}
  • EOD;
    return($strOut);
    }
    ?>

    Social Bookmarking Badges

    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 - Delicious logo
    Digg - Digg logo
    Technorati - Technorati logo