RRSSB library has recently added support for Whatsapp share button: https://github.com/kni-labs/rrssb/releases/tag/1.10.0

The following patch to add support for Whatsapp share button:
* Checkbox in the form of administration
* The display on the block

Update 1.10.0 RRSSB library is required to ensure proper display of button (the right style, color, etc.)

Comments

sir_gon created an issue. See original summary.

adamps’s picture

Version: 7.x-1.0-rc3 » 7.x-1.x-dev
Status: Active » Needs work
Issue tags: -whatsapp, -social share button, -button, -social, -share, -Sharing

Hi thanks for pointing out the new button is available. I am happy to add it to the module.

Please read the guidelines here https://www.drupal.org/patch/submit for how to submit a patch file. The patch should add all new buttons (also looks like there is one for print) and should be against the dev version.

If we are moving to a new RRSSB library version, this would need to be thoroughly tested, and the version number referenced in this module then can be updated. However the patch to add the new buttons would be a good starting point without the new library version and I would still accept it.

FYI In future I'm hoping to move to a system where tight binding of module and library version levels isn't needed. You will see the dev version has the colours stored in the module and we can auto-generate CSS from that. I've not quite finished testing it yet

adamps’s picture

abarpetia’s picture

StatusFileSize
new2.05 KB

Here is patch with whatsapp and print button.

Note: Print button will only work if we remove class="popup". I am not sure what will be the proper way to just render print button without that class.

adamps’s picture

Thanks for the patch.

I think the solution for the popup is to have a new optional parameter in the buttons config named 'popup'. Set this to FALSE for print. Default it to TRUE in rrssb_settings. Check $button['popup'] in theme_rrssb_button to decide whether to add the class.

abarpetia’s picture

Yes, I agree with you. It will be good to have one optional parameter to set popup class. I'll try to create one more patch with this updates.

adamps’s picture

@abarpetia Thanks.

I have now committed the code that auto-generates button CSS. So the new buttons should work fine with the older 1.8 library if you do a git pull of the latest code.

  • AdamPS committed a64ac0b on 7.x-1.x
    Issue #2707759 by sir_gon, abarpetia, AdamPS: Add Whatsapp share button
    
adamps’s picture

OK, I've committed the part in the patch so far, with a few changes:

  • The print button was not filling correctly for me. The default fill in CSS of #fff was overriding the fill in the attribute. I fixed it to be an inline style instead as this has higher precedence.
  • Height and width not needed
  • Sort buttons alphabetically
  • Use space to separate title and URL for consistency with existing google+ button

Please can you confirm this works for you?

We still need another patch to turn off the popup.

  • AdamPS committed 969397d on 7.x-1.x
    Issue #2707759 by AdamPS: Add Whatsapp share button: turn off popup
    
adamps’s picture

Status: Needs work » Fixed

OK, I did the popup part too

abarpetia’s picture

Nice! Tested whatsapp and print buttons, they are working for me.
Thanks

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.