A sample text widget

Etiam pulvinar consectetur dolor sed malesuada. Ut convallis euismod dolor nec pretium. Nunc ut tristique massa.

Nam sodales mi vitae dolor ullamcorper et vulputate enim accumsan. Morbi orci magna, tincidunt vitae molestie nec, molestie at mi. Nulla nulla lorem, suscipit in posuere in, interdum non magna.

How To Add Google Buzz And Plurk To WordPress’ Sociable Plugin

This post is an easy tutorial for patching the Sociable plugin for WordPress. Sociable makes the icons for sharing that you can see under the post. It offers 99 different social networks but Buzz and Plurk are still missing. 

This is not the type of post you expect on this blog, nor the type of post I expected to write. But I really like Plurk and my sister wanted Buzz. And I felt a bit of hacker's urge tonight. So, for bloggers among you, here they are.

This is quite easy and you really don't need any knowledge beside simple editing text files and uploading stuff. All you need is self-hosted WordPress site with installed Sociable to apply patch to, text editor and some FTP software. Or you can edit directly from your site's admin area. So, let's get our hands dirty. 

hackingphoto by Tzu Kwan Valino

First you need the icons for the social networks you want to add. You can download them here (right click → save link as…): Buzz and Plurk. Or make your own. They have to be 16×16 pixels, with transparent background. Find ~/wp-content/plugins/sociable/images folder and upload them there. 

Go to your theme and see if there is functions.php file. If there is, open it (it would be wise to make a backup copy first). If not, create an empty file and name it functions.php. At the end of the file add this piece of code:

<?php

function sociable_add_sites( $known_sites ) {

  $known_sites['Google Buzz'] = array(

    'favicon' => 'googlebuzz.png',

    'url' => 'http://www.google.com/buzz/post',

    'description' => 'Google Buzz'

  );

  $known_sites['Plurk'] = array(

    'favicon' => 'plurk.png',

    'url' => 'http://www.plurk.com/m?content=PERMALINK (TITLE)&qualifier=shares',

    'description' => 'Plurk'

  );

  return $known_sites;

}

add_filter('sociable_known_sites','sociable_add_sites',10,1);

?>

Now if you don't want either Buzz or Plurk you can delete the piece of code that handles them. Easier way is just not to enable them on the settings page of Sociable. And that's exactly where you should go next. But first, upload your functions.php where it belongs. 

In the Sociable's settings page, find your freshly added networks, (they are sorted alphabetically), and check them. Save settings and open any post from your blog to check if everything is OK. You'll might need to refresh the page. Good! That's it. 

This patch is resistant to upgrades of both WordPress and Sociable (thanks to Joost's tutorial). But it will not stay if you change the theme. If you change the theme, update the new functions.php.

Now be a sweetie and use the buttons below to share this post *wink* or write a comment if something went wrong or is unclear. 

Possibly related posts

4 comments to How To Add Google Buzz And Plurk To WordPress’ Sociable Plugin

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>