kartik-v / yii2-social
包含对 Yii Framework 2.0 有用的小部件的模块,集成了 DISQUS、Facebook、Google 等社交功能。
v1.3.5
2018-09-21 09:47 UTC
Requires
- facebook/graph-sdk: ~5.0
- kartik-v/yii2-krajee-base: >=1.9
README
yii2-social
允许访问 Yii Framework 2.0 的社交插件的模块。它包括以下网络插件的嵌入支持
- Disqus
- Facebook
- 点赞按钮
- 分享按钮
- 发送按钮
- 保存按钮
- 嵌入帖子
- 嵌入视频
- 关注按钮
- 评论按钮
- 页面插件
- Google Plus
- 登录插件
- +1 按钮
- 分享按钮
- 关注按钮
- 页面徽章
- 个人/个人资料徽章
- 社区徽章
- 嵌入帖子
- Google Analytics
- Twitter
- 分享按钮
- 关注按钮
- 哈希标签按钮
- 提及按钮
- 嵌入帖子/推文
- 嵌入时间线
- VKontakte
- 评论按钮
- 嵌入帖子
- 社区/组
- 点赞按钮
- 推荐
- 投票模块
- 授权
- 分享内容
- 订阅
- GitHub
- 观看按钮
- 星标按钮
- 分支按钮
- 关注按钮
- GitHubX
- 观看按钮
- 星标按钮
- 分支按钮
- 问题按钮
- 下载按钮
- 关注按钮
安装
通过composer安装此扩展是首选方法。
注意:检查此扩展的依赖项和要求composer.json。阅读有关为应用程序的 composer.json 设置
minimum-stability
设置的web tip /wiki。
运行以下命令之一
$ php composer.phar require kartik-v/yii2-social "@dev"
或
"kartik-v/yii2-social": "@dev"
将以下内容添加到您的 composer.json
文件的 require
部分中。
用法
模块配置
您可以在模块中查看用法和演示。
'modules' => [ 'social' => [ // the module class 'class' => 'kartik\social\Module', // the global settings for the disqus widget 'disqus' => [ 'settings' => ['shortname' => 'DISQUS_SHORTNAME'] // default settings ], // the global settings for the facebook plugins widget 'facebook' => [ 'app_id' => 'FACEBOOK_APP_ID', 'app_secret' => 'FACEBOOK_APP_SECRET', ], // the global settings for the google plugins widget 'google' => [ 'clientId' => 'GOOGLE_API_CLIENT_ID', 'pageId' => 'GOOGLE_PLUS_PAGE_ID', 'profileId' => 'GOOGLE_PLUS_PROFILE_ID', ], // the global settings for the google analytic plugin widget 'googleAnalytics' => [ 'id' => 'TRACKING_ID', 'domain' => 'TRACKING_DOMAIN', ], // the global settings for the twitter plugins widget 'twitter' => [ 'screenName' => 'TWITTER_SCREEN_NAME' ], ], // your other modules ]
Disqus
Google+
Google Analytics
GitHub
GitHubX
许可协议
yii2-social 采用 BSD-3-Clause 许可协议发布。有关详细信息,请参阅附带 LICENSE.md
文件。