Download the PHP package goalgorilla/shariff without Composer

On this page you can find all versions of the php package goalgorilla/shariff. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package shariff

Open Social disclaimer

We forked this repository for internal use and may abandon this at any time without any notice. We did this because we needed to make changes to the Shariff library which was no longer actively maintained.

Shariff – Give Social Media Buttons Some Privacy Build Status

Shariff enables website users to share their favorite content without compromising their privacy. Demo

Shariff Logo © 2015 Heise Medien

Some social service providers like e.g. Facebook supply official sharing code snippets which quietly siphon personal data from all page visitors. Shariff enables visitors to see how popular your page is on Facebook and share your content with others without needless data leaks.

Shariff (/ˈʃɛɹɪf/) is an open-source, low-maintenance, high-privacy solution maintained by German computer magazine c't and heise online.

Shariff consists of two parts: a simple JavaScript client library and an optional server-side component. The latter fetches the number of likes or shares. Share buttons and share counts work without a connection between your visitors' browsers and social networks (unless they decide to share, of course).

Getting Started

  1. Download the latest release
  2. Upload all files included in the release
  3. Include CSS in <head>:
    • shariff.complete.css uses the dependencies included in the release files
    • if Font Awesome is already included in your site, use build/shariff.min.css
  4. Include JavaScript right before </body>:
    • shariff.complete.js uses the dependencies included in the release files
    • if jQuery is already included in your site, use build/shariff.min.js
  5. Insert one or more <div class="shariff"> elements.
  6. Customize the look using data-* attributes.

To enable the counters in the buttons, see section Backends.

Usage example:

Getting Started using npm

You can also use Shariff's node package by installing it via npm:

Edit your JS main script, include Shariff and initialize it in one or more containers:

Running demo site

After downloading Shariff, install its dependencies by running npm install.

Options (data attributes)

Attribute Description Default
data-backend-url The path to your Shariff backend, see below. Setting the value to null disables the backend feature. No counts will occur. null
data-button-style How to display the buttons. Values: standard, icon, icon-count. With icon only the icon is shown, with icon-count icon and counter and with standard icon, text and counter are shown, depending on the display size. standard
data-flattr-category Category to be used for Flattr. null
data-flattr-user User that receives Flattr donation. null
data-info-url URL of the info page. http://ct.de/-2467514
data-info-display How to display the info page. Values: blank, popup, self. blank
data-lang The localisation to use. Available: bg, cs, da, de, en, es, fi, fr, hr, hu, it, ja, ko, nl, no, pl, pt, ro, ru, sk, sl, sr, sv, tr, zh de
data-mail-body If a mailto: link is used in data-mail-url, then this value is used as the mail body. The body text should contain the placeholder {url} which will be replaced with the share URL. see data-url
data-mail-subject If a mailto: link is used in data-mail-url, then this value is used as the mail subject. see data-title
data-mail-url The url target used for the mail service button ?view=mail
data-media-url Media url to be shared (pinterest) null
data-orientation vertical will stack the buttons vertically. horizontal
data-referrer-track A string that will be appended to the share url. Can be disabled using null. null
data-services An entity-encoded JSON string containing an array of service names to be enabled. Example: data-services="[&quot;facebook&quot;,&quot;twitter&quot;]" Available service names: twitter, facebook, linkedin, pinterest, xing, whatsapp, mail, info, addthis, tumblr, flattr, diaspora, reddit, stumbleupon, threema, weibo, tencent-weibo, qzone, print, telegram, vk, flipboard, pocket, buffer twitter, facebook, info
data-theme We include 3 color schemes, standard, grey and white. standard
data-title Title to be used as share text in Twitter/Whatsapp page's DC.title/DC.creator or <title>
data-twitter-via Screen name of the user to attribute the Tweet to null
data-url The canonical URL of the page to check. page's canonical URL or og:url or current URL

Constructor arguments

All data attributes above are also available as constructor arguments in JavaScript. However, the leading data- is omitted and the name is in camelCase instead of kebab-case:

Supported browsers

Shariff supports the following Browsers:

The current and previous major releases of Firefox, Google Chrome, Internet Explorer/Edge and Safari are supported on a rolling basis.

Supported services

Shariff supports the following social sharing services:

In addition, the service Info provides a button to show an info page about the social sharing buttons. The URL of this page can be set with an option. Default value: http://ct.de/-2467514, i.e. the c't article introducing Shariff.

Backends

In order to display share counts with Shariff, you need the following backend:

Third-party backends:

Once you have one of these backends up and running, insert its URL into the data-backend-url attribute. For example, if the backend runs under http://example.com/my-shariff-backend/, the data-backend-url should be /my-shariff-backend/. The script will handle the rest.

Third-party integrations

This is a list of integrations for third-party systems:


All versions of shariff with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package goalgorilla/shariff contains the following files

Loading the files please wait ....