black-lamp/yii2-social-networks 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

black-lamp/yii2-social-networks

Composer 安装命令:

composer require black-lamp/yii2-social-networks

包简介

Widget for adding social networks for Yii2

README 文档

README

This widget adds links to social networks.

Latest Stable Version Latest Unstable Version License

Installation

Run command

composer require black-lamp/yii2-social-networks

or add

"black-lamp/yii2-social-networks": "*"

to the require section of your composer.json.

Add 'SocialNetworks' component to application config

'components' => [
    // ...
    'socialNetworks' => [
        'class' => bl\socialNetworks\components\SocialNetworks::className(),
        'networks' => [
            'vk' => [
                'label' => 'VK',
                'link' => 'http://vk.com'
            ],
            'facebook' => [
                'label' => 'Facebook',
                'link' => 'https://facebook.com'
            ],
            'instagram' => [
                'label' => 'Instagram',
                'link' => 'https://instagram.com'
            ],
        ]
    ],
]

In this component you need to add and configure social network links

Component configuration properties

Option Description Type Default
networks Array of links to the social networks array -
attributes HTML attributes for all links array -
rewriteAttributes If set true global HTML attributes will be rewritten by custom boolean true
enableSeo Enable or disable appending SEO attributes from seoAttributes array for links boolean true
seoAttributes Array of SEO attributes for links array ['target' => '_blank', 'rel' => 'nofollow']

Configuration properties of networks array

Option Description Type
label Text for link string
link Route to the current social network string
attributes HTML attributes for link array

Using

You should use the widget for adding the share links on page

    <?= \bl\socialNetworks\SocialNetworks::widget([
        'componentId' => 'socialNetworks' // SocialNetworks component ID from application config
    ]) ?>

Other extensions

yii2-socialshare - this widget adds share links for social networks

统计信息

  • 总下载量: 82
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: GNU
  • 更新时间: 2016-10-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固