Share On

Seems to work okay on 3.3.9, but WhatsApp needed a CSS tweak - Share On

Seems to work okay on 3.3.9, but WhatsApp needed a CSS tweak

by RubiconCSL » Sat Feb 25, 2023 12:37 am

Hi.

First of all - love the extension. I can't believe it's the only Social Media share extension I could find!

I've just installed in 3.3.9 and it looks to work fine.

One small point is that the WhatsApp link doesn't work unless on a mobile, as I don't think you can use WhatsApp on a laptop/desktop. Much as I hate mod'ing any code, I have made a quick tweak to shareon.css, to hide the WhatsApp share button if not on a mobile. My CSS isn't great, so apologies if this isn't the right way to do this - or indeed not the right place to do it. But it works for me anyway :)

Code: Select all

@media only screen and (min-width: 600px), only screen and (min-device-width: 600px) {
        .whatsapp-icon {
                display: none;
        }
}
RubiconCSL
Registered User
Posts: 58
Joined: Thu May 11, 2006 9:12 am
Location: Somerset UK

Re: Seems to work okay on 3.3.9, but WhatsApp needed a CSS t

by _Vinny_ » Sat Feb 25, 2023 1:04 am

Thanks for the tip.

Currently whatsapp works on PC via web or installed app. Open vinny/shareon/event/listener.php, find:

Code: Select all

'U_WHATSAPP'	=> 'whatsapp://send?text=' . urlencode($topic_title) . ' ' . urlencode($share_url),
Replace with:

Code: Select all

'U_WHATSAPP'	=> 'https://wa.me/?text=' . urlencode($topic_title) . ' ' . urlencode($share_url),
It should works for any device.

If you want to test the new version that already has this change, in addition to other changes, feel free to check it out: https://github.com/vinny/share-on
User avatar
_Vinny_
Style Customisations
Style Customisations
Posts: 10222
Joined: Tue Aug 11, 2009 12:45 am
Location: Brazil
Name: Marcus Vinicius

Re: Seems to work okay on 3.3.9, but WhatsApp needed a CSS t

by RubiconCSL » Sat Feb 25, 2023 1:12 am

Thanks, I'll check it out.

Dominic
_Vinny_ wrote:Thanks for the tip.

Currently whatsapp works on PC via web or installed app. Open vinny/shareon/event/listener.php, find:

Code: Select all

'U_WHATSAPP'	=> 'whatsapp://send?text=' . urlencode($topic_title) . ' ' . urlencode($share_url),
Replace with:

Code: Select all

'U_WHATSAPP'	=> 'https://wa.me/?text=' . urlencode($topic_title) . ' ' . urlencode($share_url),
It should works for any device.

If you want to test the new version that already has this change, in addition to other changes, feel free to check it out: https://github.com/vinny/share-on
RubiconCSL
Registered User
Posts: 58
Joined: Thu May 11, 2006 9:12 am
Location: Somerset UK

Re: Seems to work okay on 3.3.9, but WhatsApp needed a CSS t

by _Vinny_ » Sat Feb 25, 2023 1:21 am

RubiconCSL wrote:Thanks, I'll check it out.

Dominic
_Vinny_ wrote:Thanks for the tip.

Currently whatsapp works on PC via web or installed app. Open vinny/shareon/event/listener.php, find:

Code: Select all

'U_WHATSAPP'	=> 'whatsapp://send?text=' . urlencode($topic_title) . ' ' . urlencode($share_url),
Replace with:

Code: Select all

'U_WHATSAPP'	=> 'https://wa.me/?text=' . urlencode($topic_title) . ' ' . urlencode($share_url),
It should works for any device.

If you want to test the new version that already has this change, in addition to other changes, feel free to check it out: https://github.com/vinny/share-on
Any feedback is appreciated =)
User avatar
_Vinny_
Style Customisations
Style Customisations
Posts: 10222
Joined: Tue Aug 11, 2009 12:45 am
Location: Brazil
Name: Marcus Vinicius

Re: Seems to work okay on 3.3.9, but WhatsApp needed a CSS t

by RubiconCSL » Sat Mar 11, 2023 6:54 pm

Sorry, been away for a while - not in prison, just away :)

I've applied the change and undone my css to hide WhatsApp on desktop. Looks to work fine now on both desktop and mobile.

Many thanks.
RubiconCSL
Registered User
Posts: 58
Joined: Thu May 11, 2006 9:12 am
Location: Somerset UK

Re: Seems to work okay on 3.3.9, but WhatsApp needed a CSS t

by _Vinny_ » Wed Mar 15, 2023 2:10 pm

You're welcome =)
User avatar
_Vinny_
Style Customisations
Style Customisations
Posts: 10222
Joined: Tue Aug 11, 2009 12:45 am
Location: Brazil
Name: Marcus Vinicius

Re: Seems to work okay on 3.3.9, but WhatsApp needed a CSS t

by donsenilo » Sun Apr 23, 2023 6:44 pm

And as I asked on 26 May 2022: is it possible to add the image from the post to the whatsapp-function ?
User avatar
donsenilo
Registered User
Posts: 359
Joined: Wed Oct 08, 2014 6:23 pm
Name: Markus

Re: Seems to work okay on 3.3.9, but WhatsApp needed a CSS t

by _Vinny_ » Sun Apr 23, 2023 6:46 pm

Add image and meta description with SEO Metadata: https://www.phpbb.com/customise/db/exte ... o_metadata
User avatar
_Vinny_
Style Customisations
Style Customisations
Posts: 10222
Joined: Tue Aug 11, 2009 12:45 am
Location: Brazil
Name: Marcus Vinicius

Re: Seems to work okay on 3.3.9, but WhatsApp needed a CSS t

by donsenilo » Sun Apr 23, 2023 7:10 pm

_Vinny_ wrote:Add image and meta description with SEO Metadata: https://www.phpbb.com/customise/db/exte ... o_metadata
I already have that ext. It works when I paste the post-link manually into whatsapp but it does not work with Share On.
User avatar
donsenilo
Registered User
Posts: 359
Joined: Wed Oct 08, 2014 6:23 pm
Name: Markus