Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/huyz/wp-sharedaddy

WordPress plugin: Sharedaddy with Google +1 button
https://github.com/huyz/wp-sharedaddy

Last synced: about 1 month ago
JSON representation

WordPress plugin: Sharedaddy with Google +1 button

Awesome Lists containing this project

README

        

WordPress plugin: Sharedaddy with Google +1 button
==================================================

This is a fork of a fork of Automattic's [Sharedaddy](http://wordpress.org/extend/plugins/sharedaddy/) plugin for WordPress. (Sharedaddy, by the way, is included in the great [Jetpack](http://wordpress.org/extend/plugins/jetpack/) plugin.)

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](http://p0l0.binware.org/index.php/2011/06/03/google-1-for-sharedaddy/), 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.

Screenshots
-----------

Here's what the buttons look like as a set of simple icons:

![Icons without text](wp-sharedaddy/raw/master/screenshots/screenshot-icons-only.png)

And as a set of icons with text:

![Icons with text](wp-sharedaddy/raw/master/screenshots/screenshot-icons-with-text.png)

Finally, as "smart" icons with counts (For some services, the counts only show up when > 0):

![Smart buttons](wp-sharedaddy/raw/master/screenshots/screenshot-smart-buttons.png)

Limitations
-----------

### Text link & stats ###

Google doesn't offer a way to "+1" a page via a regular link, as with other services. They only support a JavaScript button. This means that the plugin cannot display a clickable link with the text "Google +1" and cannot gather click stats for +1.

### 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](http://www.google.com/support/forum/p/Webmasters/thread?tid=6da5296e3d7207e2&hl=en) to support mobile. Once they're ready, my guess is that the button will display and work automatically without having to update Sharedaddy.

Installation
------------

1. Download the sources by clicking the "Downloads" button above to the right.
2. Open the archive and replace the `sharedaddy/` directory or the `jetpack/modules/sharedaddy/` directory.

Feedback
--------
You can comment on the blog post [Google +1 Button for WordPress plugin Sharedaddy](http://huyz.us/2011/google-1-for-sharedaddy-revised/).

[GPL License](http://www.gnu.org/licenses/)
-------------------------------------------
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.