Social Details VKontakte Widget

Latest Stable Version Latest Unstable Version Total Downloads Monthly Downloads Daily Downloads
Thankful to Krajee!
to get more out of us.

NOTE: This extension depends on the kartik-v/yii2-krajee-base extension which in turn depends on the yiisoft/yii2-bootstrap extension. Check the composer.json for this extension's requirements and dependencies that may be updated by composer.

The yii2-social module provides access to social plugins and social APIs for Yii Framework 2.0. It includes support for embedding plugins from the following networks into your website:
  • Disqus
  • Facebook
  • Google Plus
  • Google Analytics
  • Twitter
  • VKontakte
  • GitHub

The VKPlugin widget supports these parameters.
  • type: string the VK plugin type to render. Defaults to VKPlugin::COMMENTS. These can be one of the following values:

    • VKPlugin::COMMENTS: for adding commenting to your website.

    • VKPlugin::POST: for publish a post or comment from VK on your website.

    • VKPlugin::COMMUNITY: a VK community module for your site. Can display faces of members or community news.

    • VKPlugin::LIKE: allows users to 'like' objects and share links with friends.

    • VKPlugin::RECO: a module that lists most popular materials on your site according to Like widget data.

    • VKPlugin::POLL: a polling module with social features.

    • VKPlugin::AUTH: a 'Log in with VK' button for quick authorization, can also show those of the user's friends, who visited your site.

    • VKPlugin::SHARE: button that allows your users to share links on VK.

    • VKPlugin::SUBSCRIBE: button that allows users to subscribe to an author or community.

  • apiId: string|int the VK API Identifier. This is mandatory for all types except VKPlugin::POST, VKPlugin::COMMUNITY, VKPlugin::SHARE, VKPlugin::SUBSCRIBE.

  • settings: array the configuration options for each VK plugin setup as key value pairs. Refer the VK plugin documentation for details on configuring each plugin.

  • options: array the options for the VK plugin based on the type. Check the relevant documentation for the type, on available options.

  • noscript: string/boolean text to be displayed if browser does not support javascript. If set to false will not displayed. Defaults to Please enable JavaScript to view the comments powered by twitter.

  • noscriptOptions: array the HTML attributes for the noscript message container. Defaults to ['class' => 'alert alert-danger']

NOTE You can configure the VKPlugin settings once at the social module configuration level, for defaulting it across your application, and skip it in your widget calls. For example.
// your module config
'modules' => [
    'social' => [
        // the module class
        'class' => 'kartik\social\Module',

        // the global settings for the twitter widget
        'vk' => [
            'apiId' => 'API_ID',

// your call in your view/layout file
echo VKPlugin::widget([
]); // will use the VK plugin settings configured in module

Click one of the VK plugin links below to view details and demo for the plugin