2017 © Pedro Peláez
 

yii2-extension yii2-share2

Widget from form image ajax load.

image

keygenqt/yii2-share2

Widget from form image ajax load.

  • Friday, June 23, 2017
  • by keygenqt
  • Repository
  • 1 Watchers
  • 0 Stars
  • 46 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 31 % Grown

The README.md

Yii2 Share2

Packagist Downloads, (*1)

An easy way to add buttons soc network share. Widget uses the Yandex Block "Share"., (*2)

, (*3)

Installation

The preferred way to install this extension is through composer., (*4)

"require": {
    "keygenqt/yii2-share2": "*"
}

Usage

use keygenqt\share2\Share2;

= Share2::widget([
    'size' => 40,
    'margin' => 10,
    'lang' => 'en',

    'icon_facebook' => '/images/common/fb.png',
    'icon_twitter' => '/images/common/tw.png',
    'icon_linkedin' => '/images/common/in.png',

    'soc' => [Share2::SOC_FACEBOOK, Share2::SOC_TWITTER, Share2::SOC_LINKEDIN],

    'title' => 'Yii2 Share',
    'urlImage' => Url::base(true) . '/images/yii2/preview-share2.png',
    'urlPage' => Url::base(true) . Yii::$app->request->getUrl(),

]) ?>

FYI

I did not overload all the options, there are a lot of them. Only the most basic. You can find all parameters here, (*5)

Options

const SOC_YA_COLLECTIONS = 'collections';
const SOC_VK = 'vkontakte';
const SOC_FACEBOOK = 'facebook';
const SOC_GPLUS = 'gplus';
const SOC_TWITTER = 'twitter';
const SOC_LINKEDIN = 'linkedin';
const SOC_VIBER = 'viber';
const SOC_WHATSAPP = 'whatsapp';
const SOC_SKYPE = 'skype';
const SOC_TELEGRAM = 'telegram';

Some social networks do not pay attention to the image parameter passed to them. In this case, micro-marking should be used., (*6)

License

Copyright 2017-2024 Vitaliy Zarubin

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

The Versions

23/06 2017

dev-master

9999999-dev https://github.com/keygenqt/yii2-share2

Widget from form image ajax load.

  Sources   Download

BSD-3-Clause

The Requires

 

yii2 yandex share soc share2