Extension talk:ShareThis
Active X
editThis is a great extension, but it seems to be causing in error in IE7. I am running
- MediaWiki: 1.9.2
- PHP: 5.0.5 (cgi)
- MySQL: 4.1.21-standard-log
The error comes when I first access my MW installation, a pop-up, asking to click 'ok' to run Active X control. I click 'ok' then IE7 crashes. Does anyone else experience this problem? --Rovo 03:30, 29 March 2007 (UTC)
- Hmm - that's very strange. I haven't been able to reproduce this yet - I wonder if others are experiencing the same problem? Are you sure it's ShareThis and not another extension? What other extensions do you have installed (if any)? Thanks in advance. --Jimbojw 18:20, 29 March 2007 (UTC)
Minor Bug
editThe present code for the extension contains a bug:
function wfInsertShareThisSidebar($template) { global $wgShowShareThisSidebar, $wgShareThisSiteList, $wgTitle, $wgStylePath; # Short-circuit if sidebar has not been activiated. if (!$wgShowShareThisSidebar) return; # Close out the MonoBook toolbox and create a new "sharethis" portlet echo( wfMsgForContent( 'share-this-toolbox-escape-html', wfMsgForContent('share-this-sidebar-header') ) ); # Display the links uksort($wgShareThisSiteList, 'strcasecmp'); foreach ($wgShareThisSiteList as $name=>$url) { $url = str_replace('$1', urlencode($wgTitle->getFullURL()), $url); $url = str_replace('$2', urlencode($wgTitle->getText()), $url); echo( "<li id='t-".strtolower(str_replace('.','',$name))."'>" . "<a href='$url' title='Add to $name'>" . "<img src='$wgStylePath/common/images/sharethis/$name.png' /> " . "$name</a></li>" ); } }
A return true; statement should be included at the end of the hook function in order for other extensions to have the chance to successfully hook themselves on 'MonoBookTemplateToolboxEnd' hook. This cause problems with other extensions such as Extension:Clipboard. Jean-Lou Dupont 18:33, 16 May 2007 (UTC)
- Fixed! Thanks Jean-Lou --Jimbojw 20:19, 16 May 2007 (UTC)
Upgrade Issue
editAfter upgrading to 1.10.1 we lost our bookmarks. It appears that Sharethis stores its images in the skins/common/images/sharethis/ folder. When I followed the Mediawiki upgrade instructions I preserved only the images and extensions folders, hence deleting the sharethis folder.
All has been fixed but might I suggest moving the sharethis images folder into the images/sharethis path to prevent problems with future upgrades? Many thanks, Paul (scribas).
Share this box below language box?
editis there a way to put the ShareThis box below the language box? For my site, languages are more important than self promotion at this stage. --60.242.222.210 11:55, 1 December 2007 (UTC)
Additional social sites and formatting
editGreat extension now on my site, to which I have added some extra social sites, searching and bookmarks, and reformatted so that the icons become the list bullets. In ShareThis.php (adding Facebook, GoogleBookmark, IcerocketSearch, Propeller, StumbleUpon, TechnoratiSearch, Vigillar.se and YahooBookmark):
# Build list of social sites (can be modified in LocalSettings)
$wgShareThisSiteList = array(
'BlogMarks' => 'http://blogmarks.net/my/new.php?mini=1&simple=1&url=$1&title=$2',
'del.icio.us' => 'http://del.icio.us/post?url=$1&title=$2',
'digg' => 'http://digg.com/submit?phase=2&url=$1&title=$2',
'Fark' => 'http://cgi.fark.com/cgi/fark/edit.pl?new_url=$1&new_comment=$2&linktype=',
'Facebook' => 'http://www.facebook.com/sharer.php?u=$1&t=$2',
'Furl' => 'http://www.furl.net/storeIt.jsp?u=$1&t=$2',
'GoogleBookmark' => 'http://www.google.com/bookmarks/mark?op=add&bkmk=$1&title=$2',
'IcerocketSearch' => 'http://blogs.icerocket.com/search?q=$1',
'Newsvine' => 'http://www.newsvine.com/_tools/seed&save?u=$1&h=$2',
'Propeller' => 'http://www.propeller.com/submit/?U=$1&T=$2',
'reddit' => 'http://reddit.com/submit?url=$1&title=$2',
'Segnalo' => 'http://segnalo.com/post.html.php?url=$1&title=$2',
'Simpy' => 'http://www.simpy.com/simpy/LinkAdd.do?href=$1&title=$2',
'Slashdot' => 'http://slashdot.org/bookmark.pl?url=$1&title=$2',
'smarking' => 'http://smarking.com/editbookmark/?url=$1&title=$2',
'Spurl' => 'http://www.spurl.net/spurl.php?url=$1&title=$2',
'StumbleUpon' => 'http://www.stumbleupon.net/submit?url=$1&title=$2',
'TechnoratiSearch' => 'http://technorati.com/cosmos/search.html?url=$1??anguage=n&authority=n',
'Vigillar' => 'http://vigillar.se/submit?edit[url]=$1&edit[title]=$2',
'Wists' => 'http://wists.com/r.php?c=&r=$1&title=$2',
'YahooBookmark' => 'http://myweb2.search.yahoo.com/myresults/bookmarklet?u=$1&t=$2'
);
And in skins/monobook/main.css, I added:
#p-sharethis ul {list-style: none;margin-left:0.2em}
#p-sharethis img {margin-left:0.25em; margin-right:0.5em;}
And finally, I copied some of the icons from elsewhere into skins/common/images/sharethis. (iantresman) --84.9.191.165 14:02, 18 January 2008 (UTC)
icon packet for the additional services
editWould you be so kind as to provide a packet with the icons for the additional service?
Thank you! --Ozz 19:35, 30 January 2008 (UTC)
I'll have trouble viewing the icons
editPlease provide the addition icons thanks --158.59.89.10 00:00, 27 February 2008 (UTC)
- there is a paket [1] Take a closer look an the extension page for more details
I would like to include an e-mail function
editis there anyone that can tell me if it is possible to add an e-mail icon so readers can instantly email the article to a friend? the standard sharethis button has it i believe so it should be realizable. However i am a n00b when it comes to this technical stuff. please help! i have already set up this extension on my site http://www.klusopedia.nl
Only showing up on Main Page
editI followed the instructions and everything went fine. Extension is working as described...only in the main page. Is this the way it works? If it is, is there a way to make it show in all pages? Thanks in advance. This is one of the best extensions ideas in this site. --Mark 07:05, 20 November 2009 (UTC)
SIDEBAR DOES NOT WORK IN MW 1.17
editCan't seem to get the sidebar part of this to work. --Coffeehound 22:12, 30 August 2011 (UTC)
Error in 1.19.2
editI get the following error after enabling the code in LocalSettings.php:
Fatal error: Call to a member function addMessage() on a non-object in /home/content/52/9677152/html/w/extensions/ShareThis.php on line 92
Anyone have this extension working in 1.19?
Thanks,
--Craig131 (talk) 00:04, 19 October 2012 (UTC)
→This extension will not work with MW version 1.18.0 or higher, due to discontinued method calls. I just had to dig through the same information for my own wiki. Hopefully it helps someone else out.