Social Media Share Buttons

Last modified by Antoine Mottier on 2022/12/12 00:09

cogAdds a few common social media share buttons
TypeXAR
CategoryMacro
Developed by

Paul Panțiru, Mohamed Boussaa

Active Installs10
Rating
0 Votes
LicenseGNU Lesser General Public License 2.1

Installable with the Extension Manager

Description

socialsharebuttons.png
A macro that adds some social media share buttons: 

 Soclial Network   ID
Email      email 
Facebook   facebook
Google+    googleplus
LinkedIn   linkedin
Pinterest   pinterest
Twitter    twitter

Usage: 

{{shareon media='all' twitterText='Check out' hashtags='awesome' pinterestMedia="$!{myImage}" mailContent="I thought you might be interested in:"/}}

or with content:

{{shareon media='all' twitterText='Check out' hashtags='awesome'}}
 <a href="javascript:;" onclick="window.print()">
   <img src="https://simplesharebuttons.com/images/somacro/print.png" alt="Print" />
 </a>
{{/shareon}}

parameters you can use:
media - you can specify which social network you want to share on ex: media="facebook, googleplus", all being the default.
hashtags - the hashtags that will be inserted automatically in the body of the tweet after the url you are sharing (can be edited at the moment of sharing)
pinterestMedia - url of the image you want to be used when sharing with pinterest
shortText - A short text or resume that (if given) will be place on:
Twitter (before url), LinkedIn title, Pinterest, Email subject
longText - A text that (if given), will be used as the Email body before the url and as Linkedin summary.

Prerequisites & Installation Instructions

We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager). Note that installing Extensions when being offline is currently not supported and you'd need to use some complex manual method.

You can also use the following manual method, which is useful if this extension cannot be installed with the Extension Manager or if you're using an old version of XWiki that doesn't have the Extension Manager:

  1. Log in the wiki with a user having Administration rights
  2. Go to the Administration page and select the Import category
  3. Follow the on-screen instructions to upload the downloaded XAR
  4. Click on the uploaded XAR and follow the instructions
  5. You'll also need to install all dependent Extensions that are not already installed in your wiki

Release Notes

v1.4

  • Fix the incorrect mail subject issue on outlook when the shortText parameter is empty. 

v1.3

  • Made the macro available only on the current wiki

v1.2

  • Added back print functionality
  • Fixed some escape issues
  • Dropped mailContent and twitterText parameters in favour of 2 new general ones:
    shortText - A short text or resume that (if given) will be place on:
    Twitter (before url), LinkedIn title, Pinterest, Email subject
    longText - A text that (if given), will be used as the Email body before the url and as Linkedin summary.
  • Now the order in which you specify the items in the media parameter will reflect the order of the actual buttons.

v1.1

  • Changed the share by mail functionality to use the one form the platform instead of "mail to:"
  • Added posibility for the user to add his own extra bit of html in the content
  • Dropped the print functionality

v1.0

First version

Get Connected