WordPress plugin: Sharedaddy with Google +1 button
As of 2011-06-30, Sharedaddy 0.2.12 doesn't yet support a Google +1 button.
Marco Newmann extended Sharedaddy to add support for Google +1 button, but it wasn't working quite consistently with all the other services, so I hacked his modifications. These are the things I've changed:
- I reverted to the "smart button" terminology instead of talking about "count".
- All 3 major display styles (smart button, non-smart with text, non-smart without text) are supported, as much as feasible.
- The smart button is always medium-sized, and the non-smart button is always small-sized.
- In all display styles, the buttons and text are cropped and aligned properly, both within the WP Admin and on the rendered web page.
This plugin has a limited shelf-life, as Automattic will surely release an official update of Sharedaddy soon.
Here's what the buttons look like as a set of simple icons:
And as a set of icons with text:
Finally, as "smart" icons with counts (For some services, the counts only show up when > 0):
Text link & stats
Lots of space in the right margin
Google's +1 medium-sized smart button has a fixed width of 90px. So if you see extra whitespace at the right of the count, it's because Google wants to reserve the space for text that can be many lengths: "0", "2.3k", etc. Blame Google for not adjusting the width automatically.
A workaround would be to put the +1 button all the way to the right. But the Facebook button suffers the same problem: it reserves a fixed width but displays a varying amount of graphics and text, depending on what the count is. So which to put on the right? That's the kind of dilemma that's gonna make me shoot myself in the head.
Google +1 button doesn't show up in mobile
Google is not yet ready to support mobile. Once they're ready, my guess is that the button will display and work automatically without having to update Sharedaddy.
- Download the sources by clicking the "Downloads" button above to the right.
- Open the archive and replace the
sharedaddy/directory or the
You can comment on the blog post Google +1 Button for WordPress plugin Sharedaddy.
Sharedaddy is covered by the GNU General Public License, version 2.
For some reason, Marco chose to license his modifications with the GNU General Publice License, version 3. My understanding is that version 2 and version 3 are not completely compatible.