pantera-digital/yii2-yandex-share

Yandex share buttons for Yii2

Installs: 164

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 3

Forks: 2

Type:yii2-extension

dev-master 2017-12-16 05:50 UTC

This package is auto-updated.

Last update: 2024-04-17 18:00:32 UTC


README

This widget added from your site share buttons from Yandex

Share buttons for next services:

*Blogger;
*Delicious;
*Digg;
*Evernote;
*Facebook;
*Google+;
*LinkedIn;
*Живой Журнал;
*Мой Мир;
*Одноклассники.ru;
*Pinterest (требуется указать атрибут image);
*Pocket;
*Surfingbird;
*Renren;
*Sina Weibo;
*Surfingbird;
*Tencent Weibo;
*Tumblr;
*Twitter;
*Viber;
*ВКонтакте;
*WhatsApp.

Resources

Requirements

  • Yii 2.0 or above

Installation

This library can be found on Packagist. The recommended way to install this is through composer.

Edit your composer.json and add:

composer require pantera-digital/yii2-yandex-share "@dev"

Usage

Add this code in page for share:

use pantera\yandexShare\ShareButtons;

...
<?= ShareButtons::widget(
    [
        'clientOptions'=>[
            'services'=>'facebook,vkontakte,twitter', //attributes from official without preffix "data-"
            'size'=>'s',
            'lang'=>'en',
            'counter'=>true,
            'title:twitter'=>'Yandex', //a different title for the different networks
            'id'=>'id1', // not added preffix data-
            'class'=>'class1 class2', // not added preffix data-
            'tag'=>'span', //default "div" 
        ]
    ]
); ?>
...

Available services:

*blogger — *[Blogger](https://blogger.com)
*delicious — [Delicious](https://delicious.com)
*digg — [Digg](http://digg.com/)
*evernote — [Evernote](https://evernote.com)
*facebook — [Facebook](https://www.facebook.com/)
*gplus — [Google+](https://plus.google.com/)
*linkedin — [LinkedIn](https://www.linkedin.com/)
*lj — [Живой Журнал](http://www.livejournal.com/)
*moimir — [Мой Мир](https://my.mail.ru/)
*odnoklassniki — [Одноклассники.ru](http://ok.ru/)
*pinterest — [Pinterest](https://www.pinterest.com/) (требуется указать атрибут image)
*pocket — [Pocket](https://getpocket.com)
*qzone — [Surfingbird](http://surfingbird.ru/)
*renren — [Renren](http://www.renren.com/)
*sinaWeibo — [Sina Weibo](http://www.weibo.com)
*surfingburd — [Surfingbird](http://surfingbird.ru/)
*tencentWeibo — [Tencent Weibo](http://t.qq.com/)
*tumblr — [Tumblr](https://www.tumblr.com/)
*twitter — [Twitter](http://twitter.com/)
*viber — [Viber](https://www.viber.com/ru/)
*vkontakte — [ВКонтакте](https://vk.com/)
*whatsapp — [WhatsApp](https://www.whatsapp.com/)

License

The extension was released under the Apache-2.0, so you'll find the latest version on GitHub.