Main features
A pluggable widget that provides HTML5 widgets for social networks. Each button has language-options so you can set them to the language of your site. By using the networks widgetbuilders and javascript (which the module loads async in HEAD where possible) the full and latest sharing-technology is guaranteed.
The following networks are included:
Twitter => Share, @follow, #hashtag and @mention
Facebook => Like/Recommend and/or Share
Google => +1 or Share
LinkedIn => Share
Pinterest => Share or follow
Tumblr => Share
More to come and extending on existing ones also.
You can choose a lot of options for each button including counters, no counters, set the order in which they must be displayed, choose a horizontal or vertical layout, set language, width, fixed urls or flexible urls (uses path-aliases if set) and more.
In general settings you can enable widgets per node-type, the weight of the widgets, and optionally display them on teasers too (which is not usefull when you set them to a fixed url), or display the buttons in a block.
Extend this module
The module is written in a manner that it should be easy to add extra plugins. Just drop a pluginname.inc in the plugins folder and it will be picked up automatically.
First check your favorite social network for html-widgets you want to add, create a file called mynetwork.inc in the plugins folder. See the plugins/mynetwork.inc.txt for a code example, this one has the basic minimumoptions, so it should be easiest to extend on that one. Take a sneakpeak at linkedin.inc, this one is the easiest with not so much extra code at all. When creating a new plugin make sure to clear the cache when a new file is present in the pluginsfolder to enable it in the /admin/config/services/sharebuttons/settings.
You can see a demo on http://diddism.nl/blog/webdesign/sass-vs-css. This is a horizontal line-up with no counters.
Get the module here: https://drupal.org/sandbox/diddism/2259999
git clone --branch 7.x-1.x-dev http://git.drupal.org/sandbox/diddism/2259999.git sharebuttons
cd sharebuttons| Comment | File | Size | Author |
|---|---|---|---|
| like-screen.png | 67.52 KB | diddism | |
| vertical-counters.png | 15.2 KB | diddism |
Comments
Comment #1
PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxdiddism2259999git
We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #2
diddism commentedDid some work on the errors. Some of them are part of the code for improved readabilty.
This one i use a lot: String concat is not required here; use a single string instead
And what is this: Case breaking statements must be followed by a single blank line
Why does it expect to put the array in a $var and return that after the array is build?
Comment #3
diddism commentedComment #4
a_thakur commentedPlease change the git details in the project applications it should be
git clone --branch 7.x-1.x-dev http://git.drupal.org/sandbox/diddism/2259999.git sharebuttons
Coming back with more review.
Comment #5
a_thakur commentedPlease add the .install file too as in sharebuttons.settings.inc you have saved variables in variables table, so these variables have to be deleted when the module is uninstalled.
This is done using hook_uninstall() in .install file of your module.
Comment #6
a_thakur commentedComment #7
diddism commentedComment #8
diddism commentedThank you for reviewing
- Added install/uninstall info @ http://drupalcode.org/sandbox/diddism/2259999.git/commit/ac0a89c
- Updated link to git.
- Updated project description to review yesterday's changes (added some things).
Comment #9
diddism commentedComment #10
a_thakur commentedPlease change sharebuttons.settings.inc to sharebuttons.admin.inc, as this file contains the admin settings of your module, so it is a good practice to name it .admin.inc, taking example from core node module
Comment #11
diddism commentedDone! http://drupalcode.org/sandbox/diddism/2259999.git/commit/db30878
Comment #12
a_thakur commenteddidism: could you elaborate common difference between your module and other social sharing modules available for drupal.
There are many such modules which exist already like: https://drupal.org/project/addtoany, https://drupal.org/project/addthis.
Drupal believes in collaboration rather than competition, may be you could join hands with some of the existing modules or you could include similar modules on your project page.
Comment #13
diddism commentedSharebuttons has more settings out of the box per button than addtoany or addthis through webgui (though addtoany and addthis have more providers). It uses the HTML5 api's where available and the javascript the buttonprovider uses instead of the javascript of an external provider like addthis or addtoany.
I know there are a lot of similar modules for social media, but none of them was giving an easy setup for displaying the default standard buttons from the bigger networks.
For example: if you want the addtoany facebookbutton with faces, then you need to go through a process where copying/pasting is involved (according to this page: http://www.addtoany.com/buttons/customize/drupal).
I think Sharebuttons is much more friendly for end-users that know nothing about HTML but want to have and maintain a site with social media - share options and a easy setup for that.
Comment #14
diddism commentedComment #15
BigEd commentedNice little module.
A few points though.
On sharebuttons.module line 73,89,114,122,155,169,172,197,209,212,232 extra spaces are not needed.
Also some functions have a space after and some don't, for consistency I suggest you remove the space as this is quite normal.
On .install you are using function sharebuttons_enable() to print a message to the user you can do this in hook_update_n
https://api.drupal.org/api/drupal/modules%21system%21system.api.php/func... this also has the added advantage of getting your module ready for the next version that will inevitably happen after release.
Comment #16
olivierg commentedI install it without problem. I checked code and it's clear.
Just Pinterest for me I saw the error "Sorry, couldn't find any pinable..." but I wasn't put an image in my page.... :-(
So it works fine.
Comment #17
jdvc commentedOne very small functionality or docs change:
It's confusing to enable each share button separately on their respective admin pages. Maybe consolidate onto the global settings page? From the documentation it was not clear for me that 'enable plugin' meant the actual share button pages, but maybe others will figure it out, just a suggestion.
Other than that, this is the most robust and configurable sharing module that i've seen that still uses the native apis for the buttons and not a service.
Probably going to start using it right now, really nice module.
Comment #18
kscheirerNon-blocking issues:
Checked for security, licensing, Drupal API, and individual account.
Thanks for your contribution, diddism!
I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewer(s) as well.