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; } add_filter('sociable_known_sites','sociable_add_sites',10,1);
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.






Great update Yoast! Makes it easy to add lokal services now.
I may just use this one day. Thank you.
Hello,
Would be great to have the same for the customs images. I've changed the images to bigger ones, and I have to update that every time the plugin is updated ... :(
What would you need to change then? You can simply specify an image dir right? I use bigger images myself and never have to change a thing...
This is a very welcome addition... thanks for this!
Karl
Hi Joost,
I just upgraded to 3.4.1, and when I tried to update my settings, got this message: Fatal error: Call to undefined function: screen_icon() in /home/jmainehu/public_html/podcast/wp-content/plugins/sociable/sociable.php on line 982
Sorry not to post this on WordPress user forums...
Update your WordPress. Screen_icon was introduced in 2.7, 2.6 is insecure, so: update.
Awesome idea! I was just thinking about digging into the source to add sites to my list! You've made it too easy not to customize it now! I'd request a special settings section in the sociable settings page with a space where I could type php to add sites and they would be saved even when updating the plugin! But I'm stoked, I've already added a site to my sociable list!
thanks for this abdurrahman
Thanks for the great site, Yoast. While we're on the subject of Sociable, what kind of response have you had with it? Does it really seem to encourage people to share your links on social networks and ultimately drive traffic? I've been considering using it for some time on my own site, but I don't think I've ever actually used the links anywhere else around the web. Maybe that's just me, though.
it works well, but don't take my word for it, test it!
Good idea, i'm off to try and figure out how to use custom images...
Hi Yoast, love your plugin and was excited to read this article as I was forever re-adding JapanSoc.com.
However, this is probably my complete ignorance so I apologise in advance, I added the code above to my functions.php as per below:
function sociable_add_sites( $known_sites ) {
$known_sites['JapanSoc'] = array(
'favicon' => 'japansoc.ico',
'url' => 'http://www.japansoc.com/submit.php?url=PERMALINK&title=TITLE',
'description' => 'JapanSoc'
);
return $known_sites;
}
add_filter('sociable_known_sites','sociable_add_sites',10,1);
But this gives me the following fatal error:
Fatal error: Call to undefined function add_filter() in /******/wp-includes/functions.php on line 3357
When I strip out the add_filter I have no fatal error but no 'known sites' functionality either.
Like I said, this is all probably my foolishness... does the add_filter command have to go in a different location than functions.php?
sorry to disturb. i knew that it would my my own stupidity. i placed the code in the wrong functions.php! d'oh!
all resolved now. thanks for listening. :-)
Glad you've got it working!
i love sociable plugin. This plugin is very great. Many thanks
it worked as a charm!!!
thanks for your GREAT job!!
Great update Yoast! Thanks for sharing it...
Best,
Indo Contest
Nice info! I will try the code above on my theme. I using Arthemia theme. Thanks!
Great plugin Yoast! Thanks for sharing to us..
I am trying to add multiple sites by using this function in the form:
function insociable_sites( $known_sites ) {
$known_sites = array(
'Social1' => Array(
'favicon' => 'image1.png',
'url' => 'http://www.social1.com/submit',
),
'Social2' => Array(
'favicon' => 'image2.png',
'url' => 'http://www.social2.com/submit',
),
);
It does adds these sites but removes all others provided by default. It just shows these two and the remaining default selected sites. All other inactive sites are disabled. Infact the images shown by the default selected are also not shown.
How to fix this?
OK fixed it. Got the basics of PHP wrong. :lol:
I have just released a Indian Version of Sociable at http://nspeaks.com/671/indian-sociable-wordpress-plugin-released/ - It uses the above function. Thanks Joost for this.
This is a very welcome addition... thanks for this!
best regard
I love the Sociable plugin as well and thanks for the tips on how to add more sites to the list. However, I was curious if this issue had been addressed? http://wordpress.org/support/topic/288487?replies=13
I'm using WP 2.8.2 and Sociable 3.4.1 - but it was having this challenge with 2.7.1 and 2.8.1 as well.
Thank you!
Great! I was just going to suggest you the site "Chuenga". Good information :)
wow a good idea & thanks for sharing :)
Joost, are you planning on adding a store for accountnames and passwords to Sociable ? It would give the plugin a lot more potential uses.
I was JUST wondering if adding custom sites would be possible. Thank you!!
Hi Yoast
After having tried the tweetmeme plugin and finding out it gave too many errors, I now see your sociable plugin gives too many errors when validating my sites and deactivated it.
thanks for a great job
Thanks for the plugins. I've been reading on your site for the last 5 hours and implementing all the advice/plugins onto my new blog before I 'officially' open it.
I assume this means that it will now be possible, for example, to add functionality that is in other plugins (for example, WP-Email). My PHP is a bit soft, though, so I'll have to play around to figure out how to make the URL pull the WP-Email URL.
I've not installed sociable on my blog yet, I guess I better get a move on & do it. :D
Great post, great info.
Thanks,
Paul.
WOW! Thats my idea, cool! Thanks!
http://wordpress.org/support/topic/288985#post-1134697
But, I have a question. If I put this php code on funtions.php what happens when they update wordpress and they have a new funtions.php file?
Isn't it the same problem than before? I asked this feature because every time you upgrade the sociable plugin, it overwrite the edited sociable.php file and my site disappears. Now, every time wordpress upgrade the functions.php file it will overwrite the edited file?
I think the ideal solution is one that you have not to edit a wordpress file, like a second sociable.php file, something like "sociable_extra_sites.php"
Sorry if I'm wrong. Your plugin is so cool and useful.
functions.,php doesn't get replaced when WordPress is upgraded/updated. Functions.php is a part of your theme, and not part of the WordPress core that is being upgraded. Even if your theme is updated, *most* theme authors aren't updating the functions.php file because the whole idea is to have things that the user defines that don't get messed up when updating WordPress or the theme.
I am a newbie. When you talk about adding codes and things - does that also apply if you use the wordpress.org uploads. I just upgraded and am wondering if that takes care of it or if I need to do something else.
Louise
Hi there,
Just did an upgrade of sociable, but nothing seems to work right now...
Checked settings & found a whole list of notes such as this:-
"Warning: Missing argument 2 for checked(), called in /home/patron/public_html/blog/wp-content/plugins/sociable/sociable.php on line 1065 and defined in /home/patron/public_html/blog/wp-admin/includes/template.php on line 363
checked="checked" /> Front page of the blog"
Any advice you can give?
Hi
I am experiencing the same issue as Veronica - same error message. The wordpress version i am using is 2.7 - is this the problem? Is the new version of sociable unstable when used with wordpreass 2.7.
If this is not the case could you please advise what is the problem and how to rectify
Thanks
Just had this problem last night as I was trying to add some Taiwanese sites to Sociable.
I had found some sites and Icons in this post:
http://wordpress.org/support/topic/228080
Now I will just rework my theme instead.
Thank you plugin
Thanks a lot, it very helpful.
Hi Joost, I modified Sociable 3.4.4 to add ShareThis as an option. This is for a site that wants the most popular social bookmarking options clearly displayed in an uncluttered way, with ShareThis taking care of most others. If you're interested in including this in a future version I can send you the code. It does complicate things a bit: a ShareThis publisher ID is needed (with a field in the admin area to enter it) and JavaScript is required. A moderate amount of special case code to make it work.
thank you plugin admin
Thanks, very helpful
Thanks a lot, its very helpful.
This is great news, I was contacting you before for this reason, but I thought it will be hard work for you with all these social websites coming all the time to life!
Thanks for the good idea, and your support!
Thanks you for your support.
Thanks for such excellent post. Really informative blog. Keep the good work here and i wish you all the best and success.
Hi !
I just noted that when I activate your Sociable plugin Version 3.4.4, it runs well, but the dashboard disappeared (WordPress 2.8.4 - Arthemia Premium Theme).
Thanks !
Thanks for share such great thing!!!