Shariff Sharing Buttons in MediaWiki

From snippet wiki
Jump to navigation Jump to search

Place the minimized shariff.min.css and shariff.min.js file in your webroot.

Within your mediawiki LocalSettings.php add:

require_once("$IP/extensions/FooterManager/FooterManager.php");
$wgFooterManagerBanners[] = array(
        'block' => 'shariff',
        'headscript' => '<link href="/shariff.min.css" rel="stylesheet">',
        'icon' => '<div class="shariff" data-backend-url="/shariff/" data-lang="en"></div>',
        'bottomscript' => '<script src="/shariff.min.js"></script>'
);

As you can see, this requires the FooterManager extension for mediawiki.

If you want to use the php backend, expand that package in your webroot as folder shariff and configure the shariff.json like this:

{
        "cache": {
                "ttl": 60,
                "cacheDir": "/var/pathtoyour/tmp/"
        },
        "domain": "snippet.wiki",
        "services": [
                "GooglePlus",
                "Twitter",
                "Facebook"
        ]
}

Be sure to give that cacheDir folder the right owner/group like www-data and change the name of domain to your needs.