ut8ia/yii2-odnoklassniki-widget

widget for odnoklassniki social network

This package's canonical repository appears to be gone and the package has been frozen as a result.

dev-master / 1.0.x-dev 2016-11-07 13:38 UTC

This package is auto-updated.

Last update: 2019-03-10 08:44:11 UTC


README

widget for odnoklassniki social network

##Installation The preferred way to install this extension is through composer.

Either run

php composer.phar require  ut8ia/yii2-odnoklassniki-widget "dev-master"

or add

    "ut8ia/yii2-odnoklassniki-widget": "dev-master"

to the require section of your composer.json file.

##Basic usage

<?php

use ut8ia\odnoklassnikiwidget\OdnoklassnikiWidget;

...


// group widget
   echo OdnoklassnikiWidget::widget([
                               'type'=>'group_widget',
                               'group_id'=>$social['group_id']
                               ]);
               
// share - like widget
    echo OdnoklassnikiWidget::widget([
                                'type'=>'share_widget',
                                'text_type'=>3,
                                'counter_type'=>'right',
                                'size'=>12,
                                'form'=>'rounded'
                                ]);
?>

##Properties



/**
 * Class OdnoklassnikiWidget
 * http://github.com/ut8ia/odnoklassnikiwidget
 * based on odnoklassniki documentation https://apiok.ru/ext/
 *
 *    @property string $type type of widget : "share_widget" ,"group_widget"
 *    @property string $widget_id may be autogenerated
 *    @property string $group_id strictly needed for group widget
 *    @property integer $width width of group widget block
 *    @property integer $height height of group widget block
 *    @property integer $size size of share element : 12,20,30,45,70,100,150
 *    @property string $form element form mut be "oval" , "rounded" , "straight"
 *    @property string $link non strict link for origin content
 *    @property string $header manual parameter for share element
 *    @property string $description manual parameter for share element
 *    @property string $image_url manual parameter for share element
 *    @property integer $text_type type of text description must be 1,2,3 or null
 *    @property string $counter_type "top" ,"right" or null
 *
 */