Tags:
create new tag
,
view all tags
---+!! Share-Me Plugin <!-- Contributions to this plugin are appreciated. Please update the plugin page at http://twiki.org/cgi-bin/view/Plugins/ShareMePlugin or provide feedback at http://twiki.org/cgi-bin/view/Plugins/ShareMePluginDev. If you are a TWiki contributor please update the plugin in the SVN repository. --> <sticky><div style="float:right; background-color:#EBEEF0; margin:0 0 20px 20px; padding: 0 10px 0 10px;"> %TOC{title="Page contents"}% </div></sticky> 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 =%<nop>SHAREME%= anywhere in a TWiki page or preferably in a TWiki skin: %ADDTOHEAD{ "SHAREMEPLUGIN_EXAMPLE" text="<style type=\"text/css\" media=\"all\"> .example-hover { opacity: .4; -moz-opacity: .4; filter: alpha(opacity=40); } .example-hover:hover { opacity: 1; -moz-opacity: 1; filter: alpha(opacity=100); } </style>" }% %TABLE{sort="off"}% | *Write this:* | *Renders as: (if installed)* | *Simulated example:* | | =%<nop>SHAREME%= | %SHAREME{Delicious,Facebook,StumbleUpon,Twitter}% | <a href="http://delicious.com/post?url=%SCRIPTURL{view}%/%WEB%/%TOPIC%&title=%TOPIC%&notes=Icon+bar+to+share+a+TWiki+page+on+popular+social+media+sites+such+as+Facebook,+StumbleUpon,+Twitter" target='_shareme' rel='nofollow' style='border-style: none;'><img src="%ATTACHURLPATH%/delicious.png" title="Delicious" width='16' height='16' border='0' class='example-hover' /></a> <a href="http://www.facebook.com/share.php?u=%SCRIPTURL{view}%/%WEB%/%TOPIC%&t=%TOPIC%" target='_shareme' rel='nofollow' style='border-style: none;'><img src="%ATTACHURLPATH%/facebook.png" title="Facebook" width='16' height='16' border='0' class='example-hover' /></a> <a href="http://www.stumbleupon.com/submit?url=%SCRIPTURL{view}%/%WEB%/%TOPIC%&title=%TOPIC%" target='_shareme' rel='nofollow' style='border-style: none;'><img src="%ATTACHURLPATH%/stumbleupon.png" title="StumbleUpon" width='16' height='16' border='0' class='example-hover' /></a> <a href="http://twitter.com/home?status=%TOPIC%+-+%SCRIPTURL{view}%/%WEB%/%TOPIC%" target='_shareme' rel='nofollow' style='border-style: none;'><img src="%ATTACHURLPATH%/twitter.png" title="Twitter" width='16' height='16' border='0' class='example-hover' /></a> | Optionally, a list of social media sites (defined below) can be specified, such as:%BR% =%<nop>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 (%HTTP_HOST%) <noautolink> | *Name* | *Image* | *URL* | | Delicious | %ATTACHURL%/delicious.png | http://delicious.com/post?url=$link&title=$title&notes=$summary | | Digg | %ATTACHURL%/digg.png | http://digg.com/submit?phase=2&url=$link&title=$title&bodytext=$summary | | E-mail | %ATTACHURL%/email.png | mailto:?subject=$title&body=$link | | Facebook | %ATTACHURL%/facebook.png | http://www.facebook.com/share.php?u=$link&t=$title | | FriendFeed | %ATTACHURL%/friendfeed.png | http://www.friendfeed.com/share?title=$title&link=$link | | Google Plus | %ATTACHURL%/googleplus.png | https://plus.google.com/share?url=$link | | Google Bookmarks | %ATTACHURL%/googlebookmark.png | http://www.google.com/bookmarks/mark?op=edit&bkmk=$link&title=$title&annotation=$summary | | LinkedIn | %ATTACHURL%/linkedin.png | http://www.linkedin.com/shareArticle?mini=true&url=$link&title=$title&source=$site&summary=$summary | | Live | %ATTACHURL%/live.png | https://favorites.live.com/quickadd.aspx?marklet=1&url=$link&title=$title | | MisterWong | %ATTACHURL%/misterwong.png | http://www.mister-wong.com/addurl/?bm_url=$link&bm_description=$title&plugin=soc | | Mixx | %ATTACHURL%/mixx.png | http://www.mixx.com/submit?page_url=$link&title=$title | | NewsVine | %ATTACHURL%/newsvine.png | http://www.newsvine.com/_tools/seed&save?u=$link&h=$title | | Ping.fm | %ATTACHURL%/ping.png | http://ping.fm/ref/?link=$link&title=$title&body=$summary | | Posterous | %ATTACHURL%/posterous.png | http://posterous.com/share?linkto=$link&title=$title&selection=$summary | | Reddit | %ATTACHURL%/reddit.png | http://reddit.com/submit?url=$link&title=$title | | RSS | %ATTACHURL%/rss.png | %SCRIPTURL{view}%/%BASEWEB%/WebRss | | Simpy | %ATTACHURL%/simpy.png | http://www.simpy.com/simpy/LinkAdd.do?href=$link&title=$title | | Slashdot | %ATTACHURL%/slashdot.png | http://slashdot.org/bookmark.pl?title=$title&url=$link | | StumbleUpon | %ATTACHURL%/stumbleupon.png | http://www.stumbleupon.com/submit?url=$link&title=$title | | Technorati | %ATTACHURL%/technorati.png | http://technorati.com/faves?add=$link | | Twitter | %ATTACHURL%/twitter.png | http://twitter.com/home?status=$title%20-%20$link | | Yahoo! Bookmarks | %ATTACHURL%/yahoomyweb.png | http://bookmarks.yahoo.com/toolbar/savebm?u=$link&t=$title&opener=bm&ei=UTF-8&d=$summary | | Yahoo! Buzz | %ATTACHURL%/yahoobuzz.png | http://buzz.yahoo.com/submit/?submitUrl=$link&submitHeadline=$title&submitSummary=$summary&submitCategory=science&submitAssetType=text | </noautolink> ---++ Plugin Settings Plugin settings are stored as preferences variables. To reference a plugin setting write ==%<nop><plugin>_<setting>%==, such as ==%<nop>SHAREMEPLUGIN_SHORTDESCRIPTION%== * One line description, is shown in the %SYSTEMWEB%.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) * Set SITEDEFINITIONS = %SYSTEMWEB%.ShareMePlugin <noautolink> * Default site icons shown in =%<nop>SHAREME%=, subset of the ones defined in the Social Media Sites section: * Set DEFAULTSITES = Twitter, Delicious, Digg, Facebook, Google Bookmarks, LinkedIn, Reddit, StumbleUpon </noautolink> ---++ 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 ==%TOPIC%.zip== in your twiki installation directory. Content: | *File:* | *Description:* | | ==data/TWiki/%TOPIC%.txt== | Plugin topic | | ==data/TWiki/%TOPIC%.txt,v== | Plugin topic repository | | ==lib/TWiki/Plugins/%TOPIC%.pm== | Plugin Perl module | | ==pub/TWiki/%TOPIC%/*.png== | 16x16 pixel icons of social networking sites | * Configure the Plugin: * Run the [[%SCRIPTURL{configure}%][configure]] script to enable the plugin * Overload the plugin settings as needed. Do not change the plugin page, but create settings in the %USERSWEB%.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 | Plugin Author: | TWiki:Main.PeterThoeny, [[http://twiki.org/][TWiki.org]] | | Copyright: | © 2010-2012 TWiki:Main.PeterThoeny <br /> © 2010-2012 TWiki:TWiki.TWikiContributor | | License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) | | Plugin Version: | 2012-12-01 | | Change History: | <!-- versions below in reverse order --> | | 2012-12-01: | TWikibug:Item6962: Add Google+ share icon & link | | 2012-11-15: | TWikibug:Item7020: Categorize SHAREME TWiki Variable | | 2011-07-10: | TWikibug:Item6725: Change global package variables from "use vars" to "our" | | 2010-12-04: | TWikibug:Item6616: Fix to use BASETOPIC instead of TOPIC when referencing topics. This allows to add SHAREME in an included topic, such as !TopMenuSkinTopBar of TWiki:Plugins.TopMenuSkin | | 2010-06-06: | XHTML validation fixes; moving CSS to HTML head using TWiki::Func::addToHEAD | | 2010-01-16: | Doc fixes | | 2010-01-09: | Initial version | | TWiki Dependency: | $TWiki::Plugins::VERSION 1.1 | | CPAN Dependencies: | none | | Other Dependencies: | none | | Perl Version: | 5.008 | | [[TWiki:Plugins/Benchmark][Benchmarks]]: | %SYSTEMWEB%.GoodStyle 99%, %SYSTEMWEB%.FormattedSearch 100%, %TOPIC% 100% | | Plugin Home: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC% | | Feedback: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Dev | | Appraisal: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Appraisal | This plugin is inspired by [[http://wordpress.org/extend/plugins/sociable/][Sociable plugin for !WordPress]]. Some GPLed icons have been taken from that plugin. __Related Topics:__ VarSHAREME, %SYSTEMWEB%.TWikiPlugins, %SYSTEMWEB%.DeveloperDocumentationCategory, %SYSTEMWEB%.AdminDocumentationCategory, %SYSTEMWEB%.TWikiPreferences
E
dit
|
A
ttach
|
P
rint version
|
H
istory
:
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r0 - 2012-12-02
-
TWikiContributor
Home
Site map
Main web
Sandbox web
TWiki web
TWiki Web
User registration
Users
Groups
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
User Reference
ATasteOfTWiki
TextFormattingRules
TWikiVariables
FormattedSearch
QuerySearch
TWikiDocGraphics
TWikiSkinBrowser
InstalledPlugins
Admin Maintenance
Reference Manual
InterWikis
ManagingUsers
ManagingWebs
TWikiSiteTools
TWikiPreferences
WebPreferences
Categories
Admin Documentation
Admin Tools
Developer Doc
User Documentation
User Tools
Account
Log In
E
dit
A
ttach
Copyright © 1999-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback
Note:
Please contribute updates to this topic on TWiki.org at
TWiki:TWiki.ShareMePlugin
.