Skip to content

pantera-digital/yii2-yandex-share

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 

Repository files navigation

Yii2 Yandex Share Buttons widget

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.

About

Widget Yandex share button for Yii2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%