Giter Club home page Giter Club logo

wp-sharedaddy's Introduction

WordPress plugin: Sharedaddy with Google +1 button

This is a fork of a fork of Automattic's Sharedaddy plugin for WordPress. (Sharedaddy, by the way, is included in the great 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, 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

And as a set of icons with text:

Icons with text

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

Smart buttons

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 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.

GPL License

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.

wp-sharedaddy's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

dewback andymatic

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.