fourclub/yii2-social-share

Social share links button (telegram, vk, faebook, twitter, google-plus)

dev-master 2016-10-24 18:21 UTC

README

Social share links button (telegram, vk, facebook, twitter, google-plus)

Total Downloads Latest Unstable Version License

alt text

Install

    composer require fourclub/yii2-social-share "dev-master"

or add to composer.json

    "fourclub/yii2-social-share": "dev-master"

Usage

    use fourclub\social\share\SocialShareWidget;
    echo SocialShareWidget::widget([
        'url' => \yii\helpers\Url::canonical(), // or share url address
        'text' => 'Репост в', // left text for buttons group
    ]);

change all attributes

    echo SocialShareWidget::widget([
        'url' => \yii\helpers\Url::canonical(), // or share url address
        'text' => 'Репост в',       // left text for buttons group
        'tag' => 'div',             // main tag container buttons
        'tagItems' => 'span',       // tag items buttons
        'cssItems' => 'new class',  // new class for items buttons (default: "btn-social btn-social-{network}")
        'htmlOptions' => [
            'id' => 'new id',       // new id for main container buttons (default: "social-share")
        ],
    ]);

License

yii2-social-share is released under the BSD 3-Clause License. See the bundled LICENSE.md for details.