balazscsaba2006 / sharedcount
SharedCount integration into Craft CMS 3.
Installs: 1 009
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 0
Open Issues: 0
Type:craft-plugin
Requires
- php: >=7.0
- craftcms/cms: ^3.0.0
This package is auto-updated.
Last update: 2025-02-23 00:00:14 UTC
README
Fred Carlsen's SharedCount plugin ported to Craft 3.
Requirements
This plugin requires Craft CMS 3.0.0-RC1 or later.
Install
- Install with Composer via:
composer require balazscsaba2006/sharedcount
- Navigate to
Settings -> Plugins
and click the "Install" button
Configure
- Navigate to
Settings -> Plugins
and configure settings for SharedCount
Overriding plugin settings
If you create a config file in your config/
folder called sharedcount.php
, you can override
the plugin’s settings in the Control Panel. Since that config file is fully multi-environment aware, this is
a handy way to have different settings across multiple environments.
Here’s what that config file might look like along with a list of all of the possible values you can override.
<?php return [ 'apiKey' => 'My40CharacterLongApiKey', ];
Supported services
- StumbleUpon
- Google+
Usage
{% set stats = craft.sharedcount.likes({ url: 'https://www.humandirect.eu/jobs/cluj-napoca/2018-06/full-stack-mobile-app-developer-ios-android' }) %} <ul> {% for service,count in stats %} {% if count is iterable %} <li>{{ service }} <ul> {% for key,value in count %} <li>{{ key }}: {{ value }}</li> {% endfor %} </ul> </li> {% else %} <li>{{ service }}: {{ count ? count : 0 }}</li> {% endif %} {% endfor %} </ul>