Adding Sites to Sociable (3 posts)

  1. sociable
    Posted 6 years ago #

    While Sociable comes with a pretty large set of sites, there are always people that want to add their own. While this is pretty easy to do, you'd have to update the plugin every time it's updated, which is quite often, so that's not really a workable solution.

    Today, I've fixed that. I've just submitted version 3.4 to wordpress.org, this version makes it possible to add sites to Sociable from either a plugin or from your theme.

    You'd simply have to do the following:

    function sociable_add_sites( $known_sites ) {
    $known_sites['Joost'] = array(
    'favicon' => 'http://netdna.yoast.com/images/joost.jpg',
    'url' => 'http://yoast.com/submit-to-yoast',
    'description' => 'What else would you do?'
    return $known_sites;
    As you can see you can easily add your own sites now. The favicon URL can be both an absolute URL to the file, or just a filename. If it's just a filename Sociable will look for it in the image directory you've defined in the backend.

    You could also use this functionality to change the icon for a certain site, just add the following to the code above (before the return statement):

    $known_sites['del.icio.us']['favicon'] = 'http://netdna.yoast.com/images/joost.jpg';
    As said, you can either add this code into a plugin, or put it into your themes functions.php file. After doing that, the site will become available for you to pick in the Sociable admin panel.

    Update: version 3.4.1 also fixes the Sphinn submit button, to work with the new version of Sphinn.

  2. kperrone
    Posted 6 years ago #

    Interesting. Thanks. I hardly ever see people actually post how-to's on here.

  3. sociable
    Posted 6 years ago #

    It´s from Joost's blog, but it should be on here too, as there are many questions concerning the adding of services to the plugin

Topic Closed

This topic has been closed to new replies.

About this Topic