// you’re reading...

GeekSpeak

Sociable 2.0 Update: StumbleUpon Link/Submission Fix

Sociable 2.0 is a Wordpress plugin developed [mostly] by Peter Harkins and Kirk Montgomery. I haven’t read all the legalese, but the fact that it’s distributed freely and available on sourceforge tells me that it’s pretty safe for me to fix bugs in it and post my changes. (Peter, please contact me if I’m incorrect and I’ll adjust this posting as you direct me to.)

At any rate, the current 2.0 release of Sociable has a bug in the StumbleUpon submission code. I have fixed it. My guess is that this is the result of StumbleUpon changing the parameter format of their submission script (StumbleUpon appears to be written entirely in PHP).
According to StumbleUpon’s Blog Submission Guidelines, the proper stumbleupon submission format is

http://www.stumbleupon.com/submit?url= http://www.yoursite.com/article.php&title=The+Article+Title

Sociable 2.0 uses this format:

http://www.stumbleupon.com/url/http://www.yoursite.com/article.php

I have fixed this in wp-plugins/sociable/sociable.php. Beginning on line 305:


'StumbleUpon' => Array(
'favicon' => 'stumbleupon.png',
'url' => 'http://www.stumbleupon.com /url/PERMALINK',
),

…should be changed to read:

'StumbleUpon' => Array(
'favicon' => 'stumbleupon.png',
'url' => 'http://www.stumbleupon.com/submit? url=PERMALINK&title=TITLE',
),

Or, for the non propeller-heads, just download the entire package (zip’d) with the change applied here.

If this is helpful to you, please link back to Smart Guy. :-)

Discussion

11 comments for “Sociable 2.0 Update: StumbleUpon Link/Submission Fix”

  1. thanks for this - i was wondering why that one didn’t work.

    Posted by Matt Ellsworth | May 6, 2007, 7:02 pm
  2. Hi. I noticed the StumbleUpon submission link was not working for this plugin, and found your fix. I have also noticed, however, that making the described change — regardless of how it seems very correct — does not work. It is still operating incorrectly on your site as well. For now, I’m removing the StumbleUpon button from my site.

    Posted by Shaun | May 10, 2007, 4:46 pm
  3. I haven’t fixed it on my own site — fair enough. I did fix it on one of my client blogs.

    Did you try re-downloading the package, or did you make the change in your code directly?

    Posted by Uncle Johnny | May 10, 2007, 5:03 pm
  4. I tried making the change in the code directly. I also noticed that the Fark links in the Sociable Plugin are not operating either. :-(

    Posted by Shaun | May 10, 2007, 7:14 pm
  5. The code adjustments have extra line feeds in them because of the blog post formatting. The url strings should be on one line.

    Could that be the problem?

    Posted by Uncle Johnny | May 11, 2007, 12:21 am
  6. [...] just like yours truly does often with basketball. Ryan, you might want to download my Sociable Update, however. Your StumbleUpon link is [...]

    Posted by Weekly (well, almost) Linkback Love » Really Smart Guy » GeekSpeak, Real Estate, Landlording, Technology, Business Ideas, Web Marketing » Blog Archive | May 14, 2007, 6:11 pm
  7. Hey Fuery!

    Thanks for the review and many thanks for pointing out my broken StumbleUpon link. Such an easy fix and yet another thanks for having the fix posted on your site!!!

    You rock!

    Shamus

    Posted by Ryan Shamus | May 14, 2007, 7:10 pm
  8. Works like a freaking champ! Thanks a bazillion!

    Posted by Court | May 21, 2007, 1:25 pm
  9. Free Expert Articles and Tutorials…

    On this web site you can grab some free content for your website, e-book, e-zine, or report….

    Posted by Free Expert Articles and Tutorials | June 5, 2007, 3:15 am
  10. [...] of blogging death looking at me. Finally I found a nice blogger who had integrated the new code for Sociable so that I wouldn’t have to “fix” anything. I have [...]

    Posted by The Fibromyalgia Experiment » Installing Plugins with Sarakastic | January 14, 2008, 1:54 pm
  11. Thanks for that, I was looking for a way to fix it, and your site came to the rescue, cheers!

    Posted by Carl - Thatblogsite.com | January 18, 2008, 10:18 am

Post a comment