Jump to content

Extension:Share

From mediawiki.org
MediaWiki extensions manual
Share
Release status: stable
px
Implementation Skin
Description Add links/buttons to the sidebar to allow users to share a wiki's articles on social media and via email.
Author(s) Agent Isai, Alex (Agent Isaitalk)
Latest version 2.0
MediaWiki >= 1.38.0
License GNU General Public License 3.0 or later
Download
README.md
  • $wgSharePinterest
  • $wgShareLinkedIn
  • $wgShareEmail
  • $wgShareUseButtons
  • $wgShareFacebook
  • $wgShareTumblr
  • $wgShareTelegram
  • $wgShareWhatsApp
  • $wgShareWeibo
  • $wgShareReddit
  • $wgShareVK
  • $wgShareTwitter
  • viewsharelinks
Quarterly downloads 8 (Ranked 126th)
Translate the Share extension if it is available at translatewiki.net
Issues Open tasks · Report a bug

The Share extension adds a sidebar portlet which features links/buttons that allow users to share your articles on various platforms with ease.

Share supports 11 different platforms and different looks for the sidebar portlet. Pictured in the infobox is Share in its 'buttons mode'.

Installation

[edit]
  • Download and move the extracted Share folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Share
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'Share' );
    
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration

[edit]

Share allows wiki administrators to configure the look of their sidebar share links/buttons and select what platforms you do or do not want to show up on your sidebar.

By default, only Facebook and Twitter share links are enabled. All other platforms must be enabled manually. The default mode enabled is 'plain links mode' where links in the share portlet are displayed as normal links rather than buttons.

parameter default comment
$wgShareEmail false Enable 'Share via email' link in the sidebar?
$wgShareFacebook true Enable 'Share via Facebook' link in the sidebar?
$wgShareLinkedIn false Enable 'Share via LinkedIn' link in the sidebar?
$wgSharePintrest false Enable 'Share via Pinterest' link in the sidebar?
$wgShareReddit false Enable 'Share via Reddit' link in the sidebar?
$wgShareTelegram false Enable 'Share via Telegram' link in the sidebar?
$wgShareTumblr false Enable 'Share via Tumblr' link in the sidebar?
$wgShareTwitter true Enable 'Share via Twitter' link in the sidebar?
$wgShareVK false Enable 'Share via VK' link in the sidebar?
$wgShareWeibo false Enable 'Share via Weibo' link in the sidebar?
$wgShareWhatsApp false Enable 'Share via WhatsApp' link in the sidebar?
$wgShareUseButtons false Use sidebar buttons instead of sidebar links? (see screenshot)

Modes

[edit]

Share allows wiki administrators to configure the look of their sidebar share links/buttons and select what platforms you do or do not want to show up on your sidebar.

Share has two modes:

  1. Plain links mode (Default) - Sidebar share links appear as plain sidebar links, no different from sidebar links such as the ones going to the main page or to the recent changes page.
  2. Buttons mode ($wgShareUseButtons, pictured in infobox) - Sidebar share links appear as buttons users can click instead of average plain links, as pictured in the infobox.

Platform support

[edit]

Currently, Share supports 11 platforms. More platforms may be requested:

  • Email
  • Facebook
  • LinkedIn
  • Pinterest
  • Reddit
  • Telegram
  • Tumblr
  • Twitter
  • VK
  • Weibo
  • WhatsApp