Download the PHP package bigpaulie/yii2-social-share without Composer
On this page you can find all versions of the php package bigpaulie/yii2-social-share. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package yii2-social-share
yii2-social-share
Yii2 Social Link Sharer
Built using Bootstrap Social and Font Awesome , two very cool projects ! Please keep in mind that this is a work in progress.
Install
The preferred way of installing is through composer
OR add to composer.json
Example usage :
By default you can run the widget with no configuration parameters
this will produce an unordered list "ul" tag like
Changing the layout of the widget
The output of this will be something similar to :
The shared URL
By default the widget set's the URL to the current route, you can change that as needed by using the "url" property.
Or
Don't forget to require the helper library Url and to use the second parameter of the method for the full URL to the page.
The shared data
By default the widget pass to social network only URL. Some networks, for example Pinterest, allow pass title, description and image. You can change that as needed by using the "title", "description" or "image" properties.
Attributes of main container
You can add or change attributes of the main container using the htmlOptions property. By default the main container has an id attribute similar to #w0, you can change that if you want.
Widget button types
The widget provides three types of buttons extra-small (small icons only) small (icon only) large (icon + text)
The default text for the large buttons is "Share on NETWORK", where NETWORK is the name of the social network ex : Facebook. You can change the default text by using the "text" property of the widget.
Networks
Currently the widget provides 6 buttons Facebook Google Plus Twitter Pinterest Linkedin Vk odnoklassniki
Including only some networks
For some reason you may need to include only some networks. In order to do that you can use the "include" property of the widget
Presented social networks will be shown in that order in which you put them.
Excluding some networks
For some reason you may need to exclude one or more networks. In order to do that you can use the "exclude" property of the widget
Add utm marks
For enterprise apps you mostly need to add UTM mark for analytics.
Contributions
Contributions are most welcomed, just fork modify and submit a pull request.