Heise Shariff

Classification

rx_shariff

Version

10.2

Language

en

Description

The rx_shariff extension provides easy integration of Heise Shariff into TYPO3 CMS and includes the frontend scripts as well as the PHP data backend to retrieve social media stats.

Keywords

Social Media, JavaScript, GooglePlus, Twitter, Facebook, LinkedIn, Reddit, StumbleUpon, Flattr, Pinterest, Xing

Copyright

Reelworx GmbH

Author

Markus Klein

Email

support@reelworx.at

License

This document is published under the Open Content License available from http://www.opencontent.org/opl.shtml

Rendered

Mon, 12 May 2025 14:55:50 +0000

The content of this document is related to TYPO3, a GNU/GPL CMS/Framework available from www.typo3.org.

Table of Contents

What does it do?

This extension provides a ready-to-use integration of the social media buttons of Heise Shariff. The focus of these buttons is to provide more privacy for the website visitor.

Shariff Screenshot

More information about Shariff in general can be found on github.

Provided components

This extension ships the frontend part of Shariff, which comprises the CSS and JS to render the buttons, as well as the backend part, which allows to fetch the current stats of a social media provider (like count).

For easy integration a Fluid viewhelper is provided, which makes integration into Fluid templates a piece of cake. Editors can use the provided plugin, to conveniently place the social media buttons on page.

Technically, the backend part is implemented by using a TYPO3 eID script, whose data is loaded by a JS AJAX request of the frontend part. The retrieved count values are stored in the TYPO3 cache.

The extension is based on shariff and shariff-backend-php.

Installation

Install the extension via the Extension Manager as usual.

Configuration

Some settings of the extension have to be configured centrally in the Extension Manager. Those are most of the options for the backend module as documented here: https://github.com/heiseonline/shariff-backend-php

JavaScript and CSS integration

The extension ships the Frontend Javascript and default styles of Shariff. You have to add one of the five available static templates:

  • Shariff: Plugin settings only
  • Shariff: Plugin settings, FE styles only
  • Shariff: Plugin settings, FE styles and jQuery
  • Shariff: Plugin settings, FE styles incl. Font-Awesome and jQuery
  • Shariff: Plugin settings, FE styles incl. Font-Awesome but no jQuery

The templates including jQuery are including the jQuery version shipped TYPO3 CMS Core.

Frontend usage

The extension provides multiple ways to use Shariff in Frontend.

Content Element plugin

This is the easiest way to use Shariff.

Simply add a new content element to a page and select the "Shariff Social Icons" plugin. All configuration options can be adjusted as needed.

This is especially useful for editors, which should be able to put the Shariff buttons on arbitrary places on the site.

Fluid view helper

For developers a convenient view helper is available to integrate Shariff into your extension's HTML template.

<html xmlns:rx="http://typo3.org/ns/Reelworx/RxShariff/ViewHelper">
  <rx:shariff data="{url: 'http://example.com/'}" services="whatsapp,facebook,xing" enableBackend="true" />
</html>
Copied!

Optionally you can define all data attributes available for Shariff.

For your comfort the language for Shariff is automatically determined from your curernt page language.

More example usages can be found here: http://heiseonline.github.io/shariff/

Pure TypoScript

The plugin can also be rendered via TypoScript the usual way. All settings are available in TypoScript as well.

page.20 < tt_content.list.20.rxshariff_shariff
Copied!

The various settings are listed below.

If you need maximum flexibility in your integration, there is also a way to retrieve the backend module (eID script) URL via TypoScript. Simply copy the content of plugin.rx_shariff.data-backend-url:

lib.shariffBackendUrl < plugin.rx_shariff.data-backend-url
Copied!

Nice to know

Finding the logs

The extension uses the TYPO3 logging facility to log warnings when fetching counts from the various social media platforms. If you encounter problems, take a look into the logs usually located in the typo3temp folder.

Predefining plugin options

It may be your requirement to have some of the options the plugin is providing predefined and hidden from the user. This is easily doable by changing the default value for those options with TypoScript.

The default settings provided by the extension are:

tt_content.list.20.rxshariff_shariff {
   settings {
      enableBackend = 1
      data {
         lang = auto
         mail-body =
         mail-subject =
         mail-url = mailto:
         media-url = null
         orientation = horizontal
         referrer-track = null
         services =
         theme = standard
         twitter-via = null
      }
   }
}
Copied!

Override those settings for your needs and hide the fields in the plugin configuration accordingly. Use default TCEFORM page TSconfig settings to achieve this. Take a look into the TSconfig reference.

Examples:

TCEFORM.tt_content.pi_flexform.rxshariff_shariff.sDEF.settings\.enableBackend.disabled = 1
TCEFORM.tt_content.pi_flexform.rxshariff_shariff.services.disabled = 1
Copied!

Support and Contributing

Translations

The extension may be translated on the official TYPO3 translation server. Reelworx maintains the English and German translations, all other translations are very welcome.

Keep in mind that the labels used on the Shariff buttons do not stem from this extension, but are shipped directly by the upstream Shariff library, which already contains quite a few translations. The available translations can be found in the project's readme file.

Support

Support questions are usually answered in the official TYPO3 channels. That is the English mailinglist/forum and the typo3-cms Slack channel.

In case of errors check the log fies in typo3temp/logs/ for more details.

Bug reports

Please get in touch first if you think you found a bug, so we can check together.

The issue tracker can be found at https://bitbucket.org/reelworx/rx_shariff/issues

Coding

Contributions and ideas are very welcome.

The contribution workflow follows the Core rules. This means to use proper commit message formatting as described in https://docs.typo3.org/typo3cms/ContributionWorkflowGuide/Appendix/GeneralTopics/CommitMessage.html and to stick to the coding guidelines currently applicable to Core development.

Git repository: https://bitbucket.org/reelworx/rx_shariff.git

Change Log

Version 10.2.1

  • Updated shariff-backend to version 7.0.1

Version 10.2.0

  • Updated shariff to version 2.0.1 This fixes IE issues
  • Allow explicit definition of language via plugin or TypoScript again. This may cause unexpected language selection in FE when a plugin was created before version 7.3.0 because these plugins may still have a language set.

Version 10.1.0

  • Updated shariff to version 1.26.2 Added new static templates to include the new complete-JS of Shariff, which does not depend on jQuery anymore.

Version 10.0.1

  • Fixed Fluid template to work in TYPO3 6.2 as well

Version 10.0.0

  • BREAKING: The Facebook backend now always needs an app id and an API secret the former FQL mode has been removed.
  • Updated shariff-backend to version 7.0.0
  • Updated shariff to version 1.24.1

Version 9.0.1

  • The cache for share counts now uses the correct cache backend, so entries are expired correctly now.
  • Documentation fixes

Version 9.0.0

  • BREAKING: The static templates have been renamed and need to be re-included. Moreover, including a static template is now mandatory.
  • Feature: The plugin options can be defined via TypoScript now.
  • Documentation has been updated to the new rendering style.

Version 8.0.0

  • BREAKING: Officially dropped PHP 5.5 support (though the extension might still work on 5.5 - it's your own risk)
  • Updated shariff-backend to version 6.0.0

Version 7.3.1

  • Fixed composer.json information to comply with EMCONF

Version 7.3.0

  • Fixed a bug which caused too many attributes on the final div tag
  • CMS 8 compatibility
  • The language of the share buttons is chosen according to FE language
  • The extension is now translatable via TYPO3 Translation Server

Version 7.2.0

  • Updated shariff to version 1.24.0
  • Shariff-backend errors are logged to the default TYPO3 log file (typo3temp/(var/)logs/typo3_*.log)

Version 7.1.1

  • Bugfix: Shariff backend can be disabled again when using the viewhelper

Version 7.1.0

  • Allow the usage of universal tag attributes on the view helper

Version 7.0.2

  • Update shariff-backend to version 5.2.3

Version 7.0.1

  • Fix "allowedDomains" setting not shown in EM

Version 7.0.0

  • BREAKING: All URLs are now checked against the "allowedDomains" setting of the extension. By default this the local server name only. If your run more domains you need configure this setting accordingly.
  • Update shariff-backend to version 5.1.0

Version 6.0.0

  • Updated shariff-backend to version 5.0.0
  • Attention: PHP support is now 5.5 - 7.0

Version 5.2.0

  • Updated shariff to version 1.23.0

Version 5.1.1

  • Fix URL encoding of Facebook again

Version 5.1.0

  • Updated shariff to version 1.22.0
  • Updated to shariff-backend version 3.0.1
  • Fix URL encoding issues for some stat providers

Version 5.0.2

  • Fix PHP syntax error in PHP <= 5.4

Version 5.0.1

  • Fix various issues with FlexForms

Version 5.0.0

  • Updated to shariff-backend version 2.0.0
  • Removed Twitter support for backend due to termination of the API by Twitter.

Version 4.1.0

  • Updated shariff to version 1.21.0
  • PSR-7 compliant eID handling for CMS 7

Version 4.0.0

  • Breaking: Stylesheets have been moved to new Public/Css directory
  • Updated shariff to version 1.20.0
  • Updated shariff-php to version 1.6.0

Version 3.0.0

  • Breaking: Javascript is included as normal footer JS and not as footer lib
  • Updated shariff to version 1.18.0

Version 2.4.0

  • Updated shariff to version 1.17.1

Version 2.3.0

  • Declare compatibility with CMS 7.4
  • Add composer.json
  • Updated shariff to version 1.16.0

Version 2.2.0

  • Updated shariff to version 1.15.0

Version 2.1.0

  • Regression fix: Use guzzle 5.3 (6.0 slipped in by accident)
  • Updated shariff to version 1.14.0

Version 2.0.0

  • Update shariff backend to version 1.5.0
  • Use native TYPO3 caching framework instead of bundled one
  • Add Frontend plugin with FlexForms configuration

Version 1.8.0

  • Added static TypoScript templates
  • New "services" attribute for the viewhelper to ease syntax

Version 1.7.0

  • Update shariff JS to version 1.13.0

Version 1.6.0

  • Update shariff JS to version 1.12.0

Version 1.5.1

  • Removes wrong information from the documentation

Version 1.5

  • Update shariff JS to version 1.11.0
  • Improved documentation
  • TYPO3 CMS 7.2 support

Version 1.4

  • Update shariff JS to version 1.10.0

Version 1.3

  • Update shariff JS to version 1.9.3

Version 1.2

  • Update shariff JS to version 1.8.0

Version 1.1

  • Important bugfix for viewhelper
  • Update shariff JS to version 1.7.4 (fixes IE problems)

Version 1.0

Initial release

README.rst

author

mb

date

2015-10-26

This folder _make is provided as a service for convenience. It helps to render this documentation on your own machine "at home".

It is a good idea to check whether the conf.py file in this \_make folder is still up to date. The latest version should be maintained here: https://github.com/marble/typo3-docs-typo3-org-resources/blob/master/userroot/scripts/bin/conf-2015-10.py

Steps:

  1. Prepare your machine

    Follow the installation steps of http://mbless.de/blog/2015/01/26/sphinx-doc-installation-steps.html

  2. On the commandline:

    cd  path/to/_make
    make
    make html
    Copied!
  3. Open _make/build/html/Index.html in the browser.
  4. Check _make/_not_versioned/ for logfiles.

Enjoy!