Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I've created a little module that adds support for the Gigya ShareBar plugin. I'd like to provide it as a patch to the existing module. It currently adds the sharebar to the bottom of a node (see http://drupal.org/files/sharebar.png) and allows minimal customization via it's own settings page (see http://drupal.org/files/sharebar_settings.png).
There are some TODOs in comments in the module file, but I think this is a pretty decent start.
Comment | File | Size | Author |
---|---|---|---|
#14 | patch_commit_fdc6253e8475.patch | 2.13 KB | moonray |
#10 | install-and-cleanup-1110094.patch | 4.81 KB | jenlampton |
#8 | adding-install-1110094-4382910.patch | 2.82 KB | jenlampton |
#4 | gigya-sharebar-support-1110094.patch | 8.49 KB | jenlampton |
sharebar_settings.png | 30.33 KB | jenlampton |
Comments
Comment #1
gambaweb CreditAttribution: gambaweb commentedif you could post the patch I'll try and included it and take care the "TODOs"
thanks
Comment #2
gambaweb CreditAttribution: gambaweb commented@jenlampton if you could post the module as is I'll integrated it as a submodule to the current module
thanks
Comment #3
jenlamptonSure, I'll make you a patch this weekend.
Comment #4
jenlamptonI'm assuming the 3.x branch is master? Here's an attempt at a patch. let me know if it doesn't work for you.
Comment #5
drupalninja99 CreditAttribution: drupalninja99 commentedis this in dev yet?
Comment #6
gambaweb CreditAttribution: gambaweb commentedjust pushed it with some additions
- shaerbar per content type
- facebook like button
- show counts configuration
Comment #7
jenlamptonAwesome :) I'm going to add an .install file to clean up after all these new variables.
Comment #8
jenlamptonHere's the install and some general cleanup.
Comment #9
ChrisBryant CreditAttribution: ChrisBryant commented@jenlampton and gambaweb, nice work on this. :-)
Jen, I didn't see the .install included with the latest patch, was that missed by accident?
Comment #10
jenlamptonbah, #gitfail. Trying again.
Comment #11
drupalninja99 CreditAttribution: drupalninja99 commentedis the .install in dev now?
Comment #12
drupalninja99 CreditAttribution: drupalninja99 commentedDoes this support rendering the bar more than once on a page. I've been poking around and it seems to only support the node view page. I am trying to figure out the best way to make it render multiple times on a page (for views).
Comment #13
gambaweb CreditAttribution: gambaweb commentedok pushed the patch
Comment #14
moonray CreditAttribution: moonray commentedThis could use a major tweak: Give us more control through a hook_alter().
Find patch attached.
Comment #15
marcp CreditAttribution: marcp commentedI like the idea of the alter hook. Ideally, a module that implements hook_gigya_sharebar_alter() would be able to keep gigya from putting any Javascript out.
So, if in the alter hook, I clear out $settings, then it wouldn't add the gigya_sharebar javascript.
Comment #16
marcp CreditAttribution: marcp commentedThis is a great feature. Thank you for providing it! I just added #1198308: Provide option to not show sharebar on teaser which would build upon this foundation, in case anyone has time or interest in coding it up.
Comment #17
dshumaker CreditAttribution: dshumaker commentedHas anyone been able to get gigya sharebar activities to show up in the gigya activity feed block? We've got the activity feed block working and the gigya sharebar working and now we want to tie them together. I.e. If someone "likes" something via the sharbar it would be great it if those likes would show up as activity in the gigya activity stream. However I don't see how or where to add the trigger/action equivalent for facebook likes.
thanks for any hints.
Comment #18
gambaweb CreditAttribution: gambaweb commentedI added moonray hook_alter() patch so now it is easy to change the sharebar settings.
you can see docs here http://developers.gigya.com/010_Developer_Guide/18_Plugins/015_Share_Bar
and here http://developers.gigya.com/030_API_reference/010_Client_API/020_Methods...
@dshumaker you should set scope parameter in the showsharebarUI to 'both'
Comment #19
dshumaker CreditAttribution: dshumaker commentedThanks @gambaweb, I was able to set the scope parameter successfully a while ago (sorry I didn't update this thread). I'm hoping to make a new module that will include the ability in the admin section to set the scope, privacy and feedID parameters. However, while setting scope and privacy is relatively easy, setting the feedID has some implications of multiple feeds which would possibly involve multiple block creation and I'm not sure if I'll have time for that.
Comment #20
sokrplare CreditAttribution: sokrplare commentedAnyone know why "Facebook like is special"? I deleted this chunk (lines 52-56, gigya_sharebar.module):
Then swapped in a hyphen for the underscore in this bit (lines 189-192, gigya_sharebar.module):
And saw no change, FB button loaded just fine (albeit, not first in line, but that should be handled with #1469616: Add ordering to ShareBar sub-module, not code hacks). Was this necessary for an older Gigya bug/version that is no longer needed?
Just want to make sure I'm not missing something and irrevocably destroying it - little things like that ;)
Comment #21
moonray CreditAttribution: moonray commentedFrom what I can tell, it looks like it's to position the button first in the series.
Comment #22
sokrplare CreditAttribution: sokrplare commentedI agree, but I think it might be for more than that too, otherwise the 'action' => 'Like' part wouldn't be necessary and in the JS there is some special handling to pass these vars on to Gigya (which maybe used to need these for FB?).
Comment #23
sokrplare CreditAttribution: sokrplare commentedAh-ha! Was looking for something else entirely when this part of the documentation caught my eye. We've got the 'position' => 'first' part sorted out in comment #21 and #22 above, but the 'action' part was still confusing.
From Gigya's documentation at http://developers.gigya.com/020_Client_API/020_Methods/socialize.showSha...
If you're curious about the difference, this thread helps: http://www.quora.com/What-is-the-difference-between-the-Facebook-Like-bu...
Mystery solved!
Comment #24
gambaweb CreditAttribution: gambaweb commentedthere is a hook_gigya_sharebar_alter i.e. {your-module-name}_gigya_sharebar_alter function.
to do these modifications to the sharebar options
Comment #25
Gigya CreditAttribution: Gigya commentedGigya's 6.x module is deprecated. We no longer support this version and we encourage upgrading to our latest module.