fritzmg / contao-sharebuttons

Simple extension to provide share buttons as a module and content element in Contao
GNU Lesser General Public License v3.0
18 stars 2 forks source link

Neue Buttons #54

Open kroerig opened 2 years ago

kroerig commented 2 years ago

Hallo!

Ist es geplant neue Buttons aufzunehmen? z.B. Mastodon?

fritzmg commented 2 years ago

Do you know the sharer URL of Mastodon?

kroerig commented 1 year ago

It seams that this is a bit tricky. You need a share link that belongs to the instance of the user sharing the content.

fritzmg commented 1 year ago

Hm, yeah, that's not really feasible then I suppose.

kroerig commented 1 year ago

perhaps this helps: https://github.com/Aly-ve/Mastodon-share-button https://github.com/autinerd/simple-mastodon-share-button

Anke commented 1 year ago

Threema?

fritzmg commented 1 year ago

@Anke I do not understand the question. Please provide more details.

Anke commented 1 year ago

I was trying to suggest adding a Threema-Share button

fritzmg commented 1 year ago

Do you know the share URL?

// edit: I think it should be https://threema.id/compose?text=Hello https://threema.ch/en/faq/url_actions

Anke commented 1 year ago

threema://compose?text=[z.B. URL]

Ohne die id wird die Threema Kontaktliste geöffnet und man kann auswählen, an wenn man schicken will.

threema://compose?text=https://de.m.wikipedia.org/wiki/Flaggen-Bestimmungsschl%C3%BCssel

schickt den Link an Threema. Kenne mich nicht genug aus, um adhoc sagen zu können, wie zb ein Seitentitel mit übergeben wird.

fritzmg commented 1 year ago

Kenne mich nicht genug aus, um adhoc sagen zu können, wie zb ein Seitentitel mit übergeben wird.

Just have a look at the sharebuttons_default template, e.g. for WhatsApp:

https://github.com/fritzmg/contao-sharebuttons/blob/35a5794c60276f1c96564c16eeb98430b951c26f/system/modules/sharebuttons/templates/sharebuttons_default.html5#L24

Anke commented 1 year ago

Ha, great! Didn't think of that. I used to use Shariff some time ago.

Anke commented 1 year ago

According to Threema support https://threema.id/compose?text=Hello will lead to a Threema website with a button to open Threema on the device and offer download links for people not having Threema installed.

The link threema://compose?text=Hello will open Threema directly. However, it seems Contao doesn't accept this network protocol. Usig it in a HTML element, I get a 404. Using it in a hyperlink element, the webites base url is preceding the threema url like so: https://mywebsite.com/threema://compose?text=Hello.

Is there any way to make Contao deal with a url like threema://compose?[...]?

fritzmg commented 1 year ago

I am not sure what you mean. Please post your sharebuttons_default template.

Anke commented 1 year ago

I didn't add it to the template. I wanted to try to get the link to work the way I want it to, first. If I would add it to the template it would probably look like this:

<li><a class="threema" href="https://threema.id/compose?text=<?= $this->description ? $this->description . '%0A%0A' : '' ?><?= $this->url ?>" target="_blank" data-action="share/threema/share" rel="noopener noreferrer nofollow" data-escargot-ignore title="<?= $this->lang['share_on_threema'] ?>">Threema</a></li> But like I say, this detouring link is not what I have in mind. I'd like to use href="threema://compose?text=[]".

The data-protecting solution Shariff by Heise is using these direct url's for Threema and Whatsapp:

shareUrl: 'threema://compose?text=' + encodeURIComponent(title) + '%20' + url + shariff.getReferrerTrack()
shareUrl: 'whatsapp://send?text=' + encodeURIComponent(title) + '%20' + url + shariff.getReferrerTrack()
fritzmg commented 1 year ago

I didn't add it to the template. I wanted to try to get the link to work the way I want it to, first.

If you want to use a custom protocol like this then there are more steps you need to take within Contao in order to be able to fill in something like that in a HTML element in the back end. However, this has nothing to do with this issue or this extension.

But like I say, this detouring link is not what I have in mind. I'd like to use href="threema://compose?text=[]".

Then just use that? ;)