Krajee
Thankful to Krajee! BUY A COFFEEor to get more out of us.
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

Tip

Not seeing the updated content on this page! Hard refresh your browser to clean cache for this page (e.g. SHIFT-F5 on Windows Chrome)

The GithubPlugin widget supports these parameters.
  • type: string the Github plugin type to render. These can be one of the following values:

    • GithubPlugin::WATCH: string for embedding the Github watch button.

    • GithubPlugin::STAR: string for embedding the Github star button.

    • GithubPlugin::FORK: string for embedding the Github fork button.

    • GithubPlugin::FOLLOW: string for embedding the Github follow button.

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

  • options: array the HTML attributes for the main plugin. The data api attributes in this array will be automatically set based on the settings configuration.

  • tag: string the tag of the container rendering the plugin. Defaults to div.

  • 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 google.

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

NOTE You can configure the GithubPlugin 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 github widget
        'github' => [
            'settings' => ['user'=>'GITHUB_USER_ID']
        ],
]

// your call in your view/layout file
echo GithubPlugin::widget(['repo'=>'GITHUB_REPO_ID']); // will use the GitHub settings configured in module
Click one of the Github plugin links below to view details and demo for the plugin

yii2-social is released under the BSD-3-Clause License. See the bundled LICENSE.md for details.

Note

You can now visit the Krajee Webtips Q & A forum for searching OR asking questions OR helping programmers with answers on these extensions and plugins. For asking a question click here. Select the appropriate question category (i.e. Krajee Plugins) and choose this current page plugin in the question related to field.

The comments and discussion section below are intended for generic discussions or feedback for this plugin. Developers may not be able to search or lookup here specific questions or tips on usage for this plugin.

 
visitors to Krajee Yii2 Demos since 22-May-2017