elgorm / yii2-yandex-sharebuttons
Yandex share buttons for Yii2
Installs: 3 692
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 2
Open Issues: 0
Type:yii2-extension
Requires
- yiisoft/yii2: >=2.0.7
This package is auto-updated.
Last update: 2024-12-23 15:42:47 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:
{ "require": { "elgorm/yii2-yandex-sharebuttons": "^1.0@stable" } }
or run in console:
composer require elgorm/yii2-yandex-sharebuttons
Usage
Add this code in page for share:
use elgorm\sharebuttons\ShareButtons; ... <?= ShareButtons::widget( [ 'clientOptions'=>[ 'services' => 'facebook,vkontakte,twitter', //attributes from official without preffix "data-" 'size' => 's', 'lang' => 'en', '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)
*collections — [ Яндекс.Коллекции](https://yandex.ru/collections/)
*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/)
*reddit — [ Reddit](https://www.reddit.com/)
*renren — [Renren](http://www.renren.com/)
*sinaWeibo — [Sina Weibo](http://www.weibo.com)
*skype — [ Skype](https://www.skype.com/)
*surfingburd — [Surfingbird](http://surfingbird.ru/)
*telegram — [Telegram](https://telegram.org/)
*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.