Extension talk:ShareThis

From MediaWiki.org

Jump to: navigation, search

Contents

[edit] Active X

This 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)

[edit] Minor Bug

The 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)

[edit] Upgrade Issue

After 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).

[edit] Share this box below language box?

is 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)

[edit] Additional social sites and formatting

Great 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&amp;simple=1&amp;url=$1&amp;title=$2',
    'del.icio.us' => 'http://del.icio.us/post?url=$1&amp;title=$2',
    'digg' => 'http://digg.com/submit?phase=2&amp;url=$1&amp;title=$2',
    'Fark' => 'http://cgi.fark.com/cgi/fark/edit.pl?new_url=$1&amp;new_comment=$2&amp;linktype=',
    'Facebook' => 'http://www.facebook.com/sharer.php?u=$1&amp;t=$2',
    'Furl' => 'http://www.furl.net/storeIt.jsp?u=$1&amp;t=$2',
    'GoogleBookmark' => 'http://www.google.com/bookmarks/mark?op=add&amp;bkmk=$1&amp;title=$2',
    'IcerocketSearch' => 'http://blogs.icerocket.com/search?q=$1',
    'Newsvine' => 'http://www.newsvine.com/_tools/seed&amp;save?u=$1&amp;h=$2',
    'Propeller' => 'http://www.propeller.com/submit/?U=$1&amp;T=$2',
    'reddit' => 'http://reddit.com/submit?url=$1&amp;title=$2',
    'Segnalo' => 'http://segnalo.com/post.html.php?url=$1&amp;title=$2',
    'Simpy' => 'http://www.simpy.com/simpy/LinkAdd.do?href=$1&amp;title=$2',
    'Slashdot' => 'http://slashdot.org/bookmark.pl?url=$1&amp;title=$2',
    'smarking' => 'http://smarking.com/editbookmark/?url=$1&amp;title=$2',
    'Spurl' => 'http://www.spurl.net/spurl.php?url=$1&amp;title=$2',
    'StumbleUpon' => 'http://www.stumbleupon.net/submit?url=$1&amp;title=$2',
    'TechnoratiSearch' => 'http://technorati.com/cosmos/search.html?url=$1??anguage=n&authority=n',
    'Vigillar' => 'http://vigillar.se/submit?edit[url]=$1&amp;edit[title]=$2',
    'Wists' => 'http://wists.com/r.php?c=&amp;r=$1&amp;title=$2',
    'YahooBookmark' => 'http://myweb2.search.yahoo.com/myresults/bookmarklet?u=$1&amp;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)

[edit] icon packet for the additional services

Would 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)

[edit] I'll have trouble viewing the icons

Please 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
Personal tools