定制 ezsystems/share-buttons-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

ezsystems/share-buttons-bundle

Composer 安装命令:

composer require ezsystems/share-buttons-bundle

包简介

Social share buttons integration bundle into eZ Publish/eZ Platform

README 文档

README

SensioLabsInsight

This bundle adds social share buttons into Symfony applications (including eZ Publish 5.x & eZ Platform).

Requirements

  • Symfony v2.6 or later.

Installation

This package is available via Composer, so the instructions below are similar to how you install any other open source Symfony Bundle.

Run the following command in a terminal, from your Symfony installation root (pick most recent release):

php composer.phar require ezsystems/share-buttons-bundle

Enable the bundle in app/AppKernel.php file (for regular Symfony application) or ezpublish\EzPublishKernel.php file (for eZ Publish / eZ Platform):

$bundles = array(
    // existing bundles
    new EzSystems\ShareButtonsBundle\EzSystemsShareButtonsBundle()
);

Install additional assets (CSS) for default template (omit this step if you are planning to use custom stylesheets):

{% stylesheets
    bundles/ezsystemssharebuttonsbundle/css/default.css
%}
    <link rel="stylesheet" type="text/css" href="{{ asset_url }}"/>
{% endstylesheets %}

Configuration

The bundle's configuration depends on siteaccess. This is an example of settings (config.yml):

ez_share_buttons:
    system:
        default:
            # enable only those providers you are interested
            providers:
                - facebook_like
                - facebook_recommend
                - twitter
                - linkedin
                - google_plus
                - xing
            template: default
            
            facebook_like:
                # available options are: standard, box_count, button_count, button
                layout: button
                width: ~
                show_faces: true
                # displays additional `share` button
                share: false
            
            facebook_recommend:
                # available options are: standard, box_count, button_count, button
                layout: button
                width: ~
                show_faces: true
                # displays additional `share` button
                share: false

            twitter:
                show_username: false
                large_button: false
                language: ~

            linkedin:
                # available options are: top, right, none
                count_mode: none
                language: en_US

            google_plus:
                # available options are: small, medium, standard, tall
                size: medium
                # available options are: inline, bubble, none
                annotation: none
                width: ~
                language: en-GB

            xing:
                # available options are: square, none
                shape: none
                # available options are: right, top, none
                counter: none
                # available options are: de, none
                language: none

Features

Comments abstraction

ShareButtonsBundle is provider based. This means that it is open to any kind of social share services.

Single entry point

Render your social share buttons with a single line of code.

Available integration

Currently, ShareButtonsBundle is working with the following social share services:

  • Facebook like
  • Facebook recommend
  • Google Plus
  • LinkedIn share
  • Twitter
  • Xing

Usage

Insert the following Twig helper in the place where you want to display the share buttons bar:

{{ show_share_buttons() }}

You can override existing siteaccess configuration for ShareButtonsBundle by adding additional arguments:

{{ show_share_buttons(
   options = {
       provider_label: {
           key: 'value'
       },
       template: 'default'
   },
   providers = ['provider_label']
) }}

More practical example of the usage:

{{ show_share_buttons(
    options = {
        facebook_like: {
            layout: 'button_count',
            show_faces: true
        },
        google_plus: {
            size: 'small',
            annotation: 'bubble'
        }
        template: 'default'
    },
    providers = ['facebook_like', 'google_plus']
 ) }}  

License

This bundle is under GPL v2.0 license.

ezsystems/share-buttons-bundle 适用场景与选型建议

ezsystems/share-buttons-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 24.52k 次下载、GitHub Stars 达 5, 最近一次更新时间为 2015 年 10 月 21 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「twitter」 「facebook」 「social」 「linkedin」 「buttons」 「share」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 ezsystems/share-buttons-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 ezsystems/share-buttons-bundle 我们能提供哪些服务?
定制开发 / 二次开发

基于 ezsystems/share-buttons-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 5
  • Watchers: 25
  • Forks: 10
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0
  • 更新时间: 2015-10-21