Page 1 of 3

Sharing buttons

Posted: Wed May 06, 2020 10:41 pm
by Panther
Without using sharing buttons of third side (ex. addthis or addtoany or sharethis) is possible that FlatPress uses its own sharing buttons like Facebook, Twitter, Whatsapp, Messenger and Telegram (buttons more used).
Using these buttons by addthis, addtoany or sharethis, Flatpress page connect to one of these 3 websites and then go to Facebook......this is a double passage. For example on Wordpress there are many sharing plugins, the page connect directly to Facebook without passing to another website.

I am not a programmer, is possible to have this kind of plugin ?

Thanks

Re: Sharing buttons

Posted: Thu May 07, 2020 7:31 pm
by eagleman
Nice idea, maybe Arvid could create a plugin like this.
The buttons to have are, at least, Facebook, Twitter, Instagram, WhatsApp as default but it has to be easily expandable for adding more platforms if you want, like for example Telegram, Viber and so on.

Re: Sharing buttons

Posted: Fri May 08, 2020 7:40 pm
by Panther
Exactly like this

Re: Sharing buttons

Posted: Fri May 15, 2020 1:54 pm
by Panther
There is a programmer who can create this plugin ?

Re: Sharing buttons

Posted: Fri May 29, 2020 10:07 pm
by Panther
I have resolved in 2 steps without using share buttons of third sides:

1)I have created directory /Immagini where I put images of sharing media like Facebook, Twitter, Whatsapp. Messenger,Telegram, Pinterest, Linkedin, Tumblr, Reddit, Email and Print

2)I have opened file entry-default.tpl ad inserted all this in the point of the page where I wanted to show buttons.

Code: Select all

<div align=left>
<a href="http://www.facebook.com/sharer.php?u={$id|link:post_link}&title={$subject|tag:the_title}" target="_blank">
<img src="/Immagini/facebook.png" border="0" alt="Facebook" width="40" height="40">
</a>
<a href="http://twitter.com/share?text={$subject|tag:the_title}&url={$id|link:post_link}" target="_blank">
<img src="/Immagini/twitter.png" border="0" alt="Twitter" width="40" height="40" >
</a>
<a href="whatsapp://send?text={$subject|tag:the_title} {$id|link:post_link}" data-action="share/whatsapp/share" target="_blank">
<img src="/Immagini/whatsapp.png" border="0" alt="Whatsapp" width="40" height="40">
</a>
<a href="fb-messenger://share/?link={$id|link:post_link}&app_id=your-app-id-here" target="_blank">
<img src="/Immagini/messenger.png" border="0" alt="Messenger" width="40" height="40">
</a>
<a href="https://t.me/share/url?url={$id|link:post_link}&text={$subject|tag:the_title}" target="_blank">
<img src="/Immagini/telegram.png" border="0" alt="Telegram" width="40" height="40">
</a>
<a href="http://pinterest.com/pin/create/link/?url={$id|link:post_link}&description={$subject|tag:the_title}" count-layout="horizontal" target="_blank">
<img src="/Immagini/pinterest.png" border="0" alt="Pinterest" width="40" height="40">
</a>
<a href="https://www.linkedin.com/shareArticle?mini=true&url={$id|link:post_link}&title={$subject|tag:the_title}" target="_blank">
<img src="/Immagini/linkedin.png" border="0" alt="Linkedin" width="40" height="40">
</a>
<a href="http://www.tumblr.com/share/link?url={$id|link:post_link}" target="_blank">
<img src="/Immagini/tumblr.png" border="0" alt="Tumblr" width="40" height="40">
</a>
<a href="https://reddit.com/submit?url={$id|link:post_link}&title={$subject|tag:the_title}" target="_blank">
<img src="/Immagini/reddit.png" border="0" alt="Reddit" width="40" height="40">
</a>
<a href="mailto:?subject={$subject|tag:the_title}&body={$id|link:post_link}" title="{$subject|tag:the_title}">
<img src="/Immagini/email.png" border="0" alt="Email" width="40" height="40">
</a>
<a titlt="print screen" alt="print screen" onclick="window.print();"target"_blank" style="cursor:ponter;">
<img src="/Immagini/print.png" border="0" alt="Print" width="40" height="40">
</a>
</div>
This is not a plugin, but if someone is interested to create a newone, could be very useful

Re: Sharing buttons

Posted: Mon Jun 01, 2020 2:29 pm
by Arvid
Actually, this is a great solution. No need for a plugin IMO - Panther's template addition does the job very well. Thank you very much for that!

Would it be useful to have this on the wiki for future use?

Re: Sharing buttons

Posted: Mon Jun 01, 2020 5:34 pm
by Tongara
I agree that with the above code no plugin would be welcome, and I also think it would be useful to have on the Wiki.

Perhaps Panther could share the images they are using in a zip or rar that could be rehosted and included with the wiki article? Just feel it could be useful instead of people having to go out and search for their own icons, making the guide far more user friendly.

Re: Sharing buttons

Posted: Tue Jun 02, 2020 10:07 am
by Tongara
To add on from my previous post, because I am using "Font Awesome" on my Flatpress, I decided to use their icons for the above code, and the result was the following:
Image
I feel this is the works the best for me in this situation over using images, as everything I needed was already there, which is nice. Always good to be able to adapt these things. :D

This is my code, btw... you could adapt it and change the icons, their sizes, change the colour of the icons, or even have them become colourised with a simple mouseover, it's really up to you:

Code: Select all

<div align=left><b>Share this:</b> <a href="http://www.facebook.com/sharer.php?u={$id|link:post_link}&title={$subject|tag:the_title}" target="_blank">
<i class="fab fa-facebook-square fa-lg"></i></a>
<a href="http://twitter.com/share?text={$subject|tag:the_title}&url={$id|link:post_link}" target="_blank">
<i class="fab fa-twitter-square fa-lg"></i></a>
<a href="whatsapp://send?text={$subject|tag:the_title} {$id|link:post_link}" data-action="share/whatsapp/share" target="_blank">
<i class="fab fa-whatsapp-square fa-lg"></i></a>
<a href="fb-messenger://share/?link={$id|link:post_link}&app_id=your-app-id-here" target="_blank">
<i class="fab fa-facebook-messenger fa-lg"></i></a>
<a href="http://pinterest.com/pin/create/link/?url={$id|link:post_link}&description={$subject|tag:the_title}" count-layout="horizontal" target="_blank">
<i class="fab fa-pinterest-square fa-lg"></i></a>
<a href="http://www.tumblr.com/share/link?url={$id|link:post_link}" target="_blank">
<i class="fab fa-tumblr-square fa-lg"></i></a>
<a href="https://reddit.com/submit?url={$id|link:post_link}&title={$subject|tag:the_title}" target="_blank">
<i class="fab fa-reddit-square fa-lg"></i></a>
<a href="mailto:?subject={$subject|tag:the_title}&body={$id|link:post_link}" title="{$subject|tag:the_title}">
<i class="fas fa-envelope-square fa-lg"></i></a>
</div>

Re: Sharing buttons

Posted: Tue Jun 02, 2020 8:55 pm
by Panther
I have create sharingbuttons.zip with image icons and readme.txt for instructions.

Re: Sharing buttons

Posted: Fri Jun 05, 2020 5:43 pm
by Arvid
Thank you very much, this is really useful.
I created a how-to page on the wiki for this.