定制 webvpf/wn-share-plugin 二次开发

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

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

webvpf/wn-share-plugin

Composer 安装命令:

composer require webvpf/wn-share-plugin

包简介

Share Buttons - plugin for Winter CMS. Displays share buttons.

README 文档

README

Share Buttons - plugin for Winter CMS. Plugin component displays share buttons.

Инструкция на русском языке: https://github.com/WebVPF/wn-share-plugin/wiki

Installation Сomposer:

composer require webvpf/wn-share-plugin

Social Networks and Messengers:

  • Facebook
  • Twitter
  • VK
  • Odnoklassniki
  • LinkedIn
  • Telegram
  • Viber
  • WhatsApp
  • X

Features:

  • easy setup
  • opens in a popup window or smartphone app
  • not blocked by adblockers
  • SVG icons are used for buttons, so there are no dependencies on icon fonts
  • no external links
  • there is no interaction with database
  • optimized javascript file less than 1 Kb
  • without jQuery

Selecting and Sorting Buttons

Specify the id of the buttons that you want to display, separated by commas (fb, tw, vk, ok, in, tg, vb, wa, x)

Component Share Buttons

In this case, you can specify the order in which the buttons will be displayed.

You can do a similar layout:

<div>Share: {% component 'ShareButtons' %}</div>

or

<div class="container">
    <h3>Share</h3>
    <div>{% component 'ShareButtons' %}</div>
</div>

Button Style

Silver

Silver

Color

Color

With text

With text

Simple settings are available in the component settings.

Disable css

You can completely disable predefined css in component settings. Styles can be placed in css themes or wherever convenient for you.

Paste buttons

If you work with code, you can insert buttons as follows:

[ShareButtons]
btns = "fb, tw, vk, ok, in, tg, vb, wa, x"
css = 1
skin = "text"
==
<div>Share: {% component 'ShareButtons' %}</div>

Buttons:

  • fb - Facebook
  • in - LinkedIn
  • ok - Odnoklassniki
  • tg - Telegram
  • tw - Twitter
  • vb - Viber
  • vk - VK
  • wa - WhatsApp
  • x - X

CSS:

  • 1 - enable
  • 0 - disable

Skins:

  • silver
  • color
  • text

Function share

You can call the share() function from within your scripts.

share(id, paramsUrl);
Parameter Type Required Description
id string Yes Social network ID (fb, tw, vk, ok, in, tg, vb, wa, x)
paramsUrl object No Can have search and hash options.

Examples

The following example will send a page link to the Telegram messenger.

share('tg');

// https://example.com/slug

search parameter

Part of the address after ?

share('wa', {search: 'a=2&b=3'});

// https://example.com/slug?a=2&b=3

hash parameter

The part of the URL that comes after the pound sign '#'

share('wa', {hash: 'anchor'});

// https://example.com/slug#anchor

search and hash parameters

share('wa', {search: 'a=2&b=3', hash: 'anchor'});

// https://example.com/slug?a=2&b=3#anchor

webvpf/wn-share-plugin 适用场景与选型建议

webvpf/wn-share-plugin 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 514 次下载、GitHub Stars 达 7, 最近一次更新时间为 2021 年 05 月 03 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

围绕 webvpf/wn-share-plugin 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

  • Stars: 7
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-05-03