2017 © Pedro Peláez
 

yii2-extension yii2-social-networks

Widget for adding social networks for Yii2

image

black-lamp/yii2-social-networks

Widget for adding social networks for Yii2

  • Thursday, November 17, 2016
  • by GutsVadim
  • Repository
  • 2 Watchers
  • 0 Stars
  • 72 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 14 % Grown

The README.md

Social networks widget for Yii2

This widget adds links to social networks., (*1)

Latest Stable Version Latest Unstable Version License, (*2)

Installation

Run command

composer require black-lamp/yii2-social-networks

or add, (*3)

"black-lamp/yii2-social-networks": "*"

to the require section of your composer.json., (*4)

Add 'SocialNetworks' component to application config

'components' => [
    // ...
    'socialNetworks' => [
        'class' => bl\socialNetworks\components\SocialNetworks::className(),
        'networks' => [
            'vk' => [
                'label' => 'VK',
                'link' => 'http://vk.com'
            ],
            'facebook' => [
                'label' => 'Facebook',
                'link' => 'https://facebook.com'
            ],
            'instagram' => [
                'label' => 'Instagram',
                'link' => 'https://instagram.com'
            ],
        ]
    ],
]

In this component you need to add and configure social network links, (*5)

Component configuration properties

Option Description Type Default
networks Array of links to the social networks array -
attributes HTML attributes for all links array -
rewriteAttributes If set true global HTML attributes will be rewritten by custom boolean true
enableSeo Enable or disable appending SEO attributes from seoAttributes array for links boolean true
seoAttributes Array of SEO attributes for links array ['target' => '_blank', 'rel' => 'nofollow']

Configuration properties of networks array

Option Description Type
label Text for link string
link Route to the current social network string
attributes HTML attributes for link array

Using

You should use the widget for adding the share links on page, (*6)

    <?= \bl\socialNetworks\SocialNetworks::widget([
        'componentId' => 'socialNetworks' // SocialNetworks component ID from application config
    ]) ?>

Other extensions

yii2-socialshare - this widget adds share links for social networks, (*7)

The Versions

17/11 2016

dev-master

9999999-dev

Widget for adding social networks for Yii2

  Sources   Download

GNU Public License

The Requires

 

by Vladimir Kuprienko

social yii2 widget networks

10/11 2016

1.2.0

1.2.0.0

Widget for adding social networks for Yii2

  Sources   Download

GNU Public License

The Requires

 

by Vladimir Kuprienko

social yii2 widget networks

10/11 2016

1.1.1

1.1.1.0

Widget for adding social networks for Yii2

  Sources   Download

GNU Public License

The Requires

 

by Vladimir Kuprienko

social yii2 widget networks

04/11 2016

1.1.0

1.1.0.0

Widget for adding social networks for Yii2

  Sources   Download

GNU Public License

The Requires

 

by Vladimir Kuprienko

social yii2 widget networks

31/10 2016

1.0.0

1.0.0.0

Widget for adding social networks for Yii2

  Sources   Download

GNU Public License

The Requires

 

by Vladimir Kuprienko

social yii2 widget networks