assayer-pro/yii2-social-likes

Yii2 wrapper for social like buttons, see http://sapegin.github.io/social-likes/

1.1.0 2016-02-15 06:08 UTC

This package is auto-updated.

Last update: 2024-12-14 05:32:02 UTC


README

PHP version

Yii2 widget for Social Likes: share buttons with counters for popular social networks. Beautiful share buttons with counters for popular social networks: Facebook, Twitter, Google+, Pinterest, Vkontakte, etc. Uses jQuery.

Yii2 wrapper for http://sapegin.github.io/social-likes/

Installation

The preferred way to install this extension is through composer.

  • Either run
php composer.phar require --prefer-dist "assayer-pro/yii2-social-likes" "*"

or add

"assayer-pro/yii2-social-likes" : "*"

to the require section of your application's composer.json file.

Usage

use assayerpro\SocialLikes\SocialLikes;
...
echo SocialLikes::widget([
  'skin' => 'birman',
  'buttons' => [
    'facebook' => [
      'title' => 'Share link on Facebook',
      'name' => 'Facebook',
      'show' => true,
    ],
    'twitter' => [
      'title' => 'Share link on Twitter',
      'name' => 'Twitter',
      'show' => true,
    ],
    'plusone' => [
      'title' => 'Share link on Google+',
      'name' => 'Google+',
      'show' => true,
  ],
]);