Giter Club home page Giter Club logo

kirby-plugin-shariff's Introduction

Shariff plugin

A plugin for Kirby CMS to include Shariff social media buttons with ease.

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

NOTE: In the current release from c't shariff supports only 3 Languages: en, de, es.

Installation

  • Download the complete source code
  • Copy assets/plugins/shariff to your pages asset directory
    • If you use another path, make shure to change the config variable shariff.url
  • Copy site/plugins/shariff to your pages plugin directory
  • Copy the content of site/config/config.php to your config file and adjust them as you like

Config Variables

Shariff Frontend

Default configuration for the shariff frontend is set as shown in site/config/config.php. There is no need to configure any settings as long as you don't want to change them.

  • language [en]: set locale code of your page if page is not multilingual (available: bg, de, en, es, fi, hr, hu, ja, ko, no, pl, pt, ro, ru, sk, sl, sr, sv, tr, zh)
  • page.uses_jquery: set true, if your page already uses jquery. Otherwise it will be included.
  • page.uses_fa: set true, if your page already uses fontawesome. Otherwise it will be included.
  • shariff.url: path to shariff asset files
  • shariff.use_backend: true, if you want to use the shariff backend to show the count of shares for your pages
  • shariff.orientation: horizontal or vertical
  • shariff.referrer_check: String to append to the shared urls
  • shariff.services: array of used service plugins (available: twitter, facebook, googleplus, linkedin, pinterest, xing, whatsapp, mail, info)
  • shariff.theme: standard, grey or white
  • shariff.info: Information page about shariff. default: c't article about shariff. If set, it will be resolved using url(), so you can set it to any kirby-internal page with own content

Shariff Backend

Required configuration!

Set domain in assets/plugins/shariff/backend/shariff.json to the main domain of your webpage. The shariff backend accepts only count requests for this domain.

Furthermore you can adjust the TTL of caching for the counts and requested services.

How to use it

  • Include the shariff-stylesheet in your pages head: <?php echo css(shariff_css()) ?>
  • Include the shariff-stylesheet at the end of your page, anywhere before <?php echo js(shariff_js()) ?>
  • Use the buttons in your templates wherever you like <?php echo shariff_buttons() ?>

Author

Michael Fürmann @ Spicy Web

kirby-plugin-shariff's People

Contributors

qroac avatar

Watchers

Lee Tengum avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.