{"id":26180168,"url":"https://github.com/webvpf/wn-share-plugin","last_synced_at":"2026-03-06T03:32:22.778Z","repository":{"id":46324519,"uuid":"242692501","full_name":"WebVPF/wn-share-plugin","owner":"WebVPF","description":"Share Buttons - plugin for Winter CMS","archived":false,"fork":false,"pushed_at":"2025-04-06T08:10:12.000Z","size":60,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T09:20:43.829Z","etag":null,"topics":["share","wintercms","wintercms-plugin"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/webvpf/wn-share-plugin","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WebVPF.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-24T09:16:23.000Z","updated_at":"2025-04-06T08:10:15.000Z","dependencies_parsed_at":"2025-04-06T09:30:02.636Z","dependency_job_id":null,"html_url":"https://github.com/WebVPF/wn-share-plugin","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebVPF%2Fwn-share-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebVPF%2Fwn-share-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebVPF%2Fwn-share-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebVPF%2Fwn-share-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WebVPF","download_url":"https://codeload.github.com/WebVPF/wn-share-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248975302,"owners_count":21192198,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["share","wintercms","wintercms-plugin"],"created_at":"2025-03-11T21:54:43.948Z","updated_at":"2026-03-06T03:32:22.724Z","avatar_url":"https://github.com/WebVPF.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Share\n\nShare Buttons - plugin for Winter CMS. Plugin component displays share buttons.\n\nИнструкция на русском языке: https://github.com/WebVPF/wn-share-plugin/wiki\n\nInstallation Сomposer:\n\n```bash\ncomposer require webvpf/wn-share-plugin\n```\n\nSocial Networks and Messengers:\n\n- Facebook\n- Twitter\n- VK\n- Odnoklassniki\n- LinkedIn\n- Telegram\n- Viber\n- WhatsApp\n\nFeatures:\n\n- easy setup\n- opens in a popup window or smartphone app\n- not blocked by adblockers\n- SVG icons are used for buttons, so there are no dependencies on icon fonts\n- no external links\n- there is no interaction with database\n- optimized [javascript file](https://github.com/WebVPF/wn-share-plugin/blob/master/assets/js/share.min.js \"open file\") less than 1 Kb\n- without jQuery\n\n## Selecting and Sorting Buttons\n\nSpecify the id of the buttons that you want to display, separated by commas (fb, tw, vk, ok, in, tg, vb, wa)\n\n![Component Share Buttons](https://user-images.githubusercontent.com/61043464/112979788-b89bb700-9161-11eb-8698-81be8763e919.jpg)\n\nIn this case, you can specify the order in which the buttons will be displayed.\n\nYou can do a similar layout:\n\n```twig\n\u003cdiv\u003eShare: {% component 'ShareButtons' %}\u003c/div\u003e\n```\n\nor\n\n```twig\n\u003cdiv class=\"container\"\u003e\n    \u003ch3\u003eShare\u003c/h3\u003e\n    \u003cdiv\u003e{% component 'ShareButtons' %}\u003c/div\u003e\n\u003c/div\u003e\n```\n\n---\n\n## Button Style\n\nSilver\n\n![Silver](https://user-images.githubusercontent.com/61043464/75198717-f57cc980-5769-11ea-97c6-539071d1cb4e.jpg)\n\nColor\n\n![Color](https://user-images.githubusercontent.com/61043464/75198720-f7468d00-5769-11ea-9627-4d81da355d3b.jpg)\n\nWith text\n\n![With text](https://user-images.githubusercontent.com/61043464/75198725-fa417d80-5769-11ea-801f-beb789e474c5.jpg)\n\nSimple settings are available in the component settings.\n\n## Disable css\n\nYou can completely disable predefined css in component settings. Styles can be placed in css themes or wherever convenient for you.\n\n---\n\n## Paste buttons\n\nIf you work with code, you can insert buttons as follows:\n\n```ini\n[ShareButtons]\nbtns = \"fb, tw, vk, ok, in, tg, vb, wa\"\ncss = 1\nskin = \"text\"\n==\n\u003cdiv\u003eShare: {% component 'ShareButtons' %}\u003c/div\u003e\n```\n\n### Buttons:\n\n- `fb` - Facebook\n- `in` - LinkedIn\n- `ok` - Odnoklassniki\n- `tg` - Telegram\n- `tw` - Twitter\n- `vb` - Viber\n- `vk` - VK\n- `wa` - WhatsApp\n\n### CSS:\n\n- 1 - enable\n- 0 - disable\n\n### Skins:\n\n- `silver`\n- `color`\n- `text`\n\n## Function `share`\n\nYou can call the `share()` function from within your scripts.\n\n```js\nshare(id, paramsUrl);\n```\n\nParameter   | Type   | Required | Description\n------------|--------|----------|------------\n`id`        | string | Yes      | Social network ID (fb, tw, vk, ok, in, tg, vb, wa)\n`paramsUrl` | object | No       | Can have `search` and `hash` options.\n\n### Examples\n\nThe following example will send a page link to the Telegram messenger.\n\n```js\nshare('tg');\n\n// https://example.com/slug\n```\n\n#### `search` parameter\n\nPart of the address after `?`\n\n```js\nshare('wa', {search: 'a=2\u0026b=3'});\n\n// https://example.com/slug?a=2\u0026b=3\n```\n\n#### `hash` parameter\n\nThe part of the URL that comes after the pound sign '#'\n\n```js\nshare('wa', {hash: 'anchor'});\n\n// https://example.com/slug#anchor\n```\n\n#### `search` and `hash` parameters\n\n```js\nshare('wa', {search: 'a=2\u0026b=3', hash: 'anchor'});\n\n// https://example.com/slug?a=2\u0026b=3#anchor\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebvpf%2Fwn-share-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebvpf%2Fwn-share-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebvpf%2Fwn-share-plugin/lists"}