Share-Me Plugin
Add a bar of icons to share a TWiki page on popular social media sites and bookmarking sites such as Digg, Facebook, StumbleUpon, Twitter.
Syntax Rules
Add
%SHAREME%
anywhere in a TWiki page or preferably in a TWiki skin:
Write this: |
Renders as: (if installed) |
Simulated example: |
%SHAREME% |
%SHAREME{Delicious,Facebook,StumbleUpon,Twitter}% |
|
Optionally, a list of social media sites (defined below) can be specified, such as:
%SHAREME{"Delicious, Facebook, StumbleUpon, Twitter"}%
.
Social Media Sites
This table defines the social media sites. The following variables can be used in the URL column:
-
$link
: Link of the TWiki topic
-
$title
: Spaced out topic name
-
$summary
: Topic summary
-
$site
: Site host name (sprace.org.br)
Plugin Settings
Plugin settings are stored as preferences variables. To reference a plugin setting write
%<plugin>_<setting>%
, such as
%SHAREMEPLUGIN_SHORTDESCRIPTION%
- One line description, is shown in the TextFormattingRules topic:
- Set SHORTDESCRIPTION = Icon bar to share TWiki pages on popular social media sites such as Facebook, StumbleUpon, Twitter
- Topic that defines the social media sites: (default: This topic)
- Default site icons shown in
%SHAREME%
, subset of the ones defined in the Social Media Sites section:
- Set DEFAULTSITES = Twitter, Delicious, Digg, Facebook, Google Bookmarks, LinkedIn, Reddit, StumbleUpon
Plugin Installation Instructions
Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the TWiki server.
- Download the ZIP file from the Plugin Home (see below)
- Unzip
ShareMePlugin.zip
in your twiki installation directory. Content: File: | Description: |
data/TWiki/ShareMePlugin.txt | Plugin topic |
data/TWiki/ShareMePlugin.txt,v | Plugin topic repository |
lib/TWiki/Plugins/ShareMePlugin.pm | Plugin Perl module |
pub/TWiki/ShareMePlugin/*.png | 16x16 pixel icons of social networking sites |
- Configure the Plugin:
- Run the configure script to enable the plugin
- Overload the plugin settings as needed. Do not change the plugin page, but create settings in the TWikiPreferences page. For example, to overload the DEFAULTSITES setting, create a SHAREMEPLUGIN_DEFAULTSITES in the TWikiPreferences page.
- Test if the installation was successful: %SHAREME%
Plugin Info
This plugin is inspired by
Sociable plugin for WordPress. Some GPLed icons have been taken from that plugin.
Related Topics: VarSHAREME,
TWikiPlugins,
DeveloperDocumentationCategory,
AdminDocumentationCategory,
TWikiPreferences