# Add VK share for topics

**URL:** <https://meta.discourse.org/t/add-vk-share-for-topics/77428>\
**Category:** Product Support\
**Created:** [January 7, 2018, 10:23pm UTC](https://meta.discourse.org/t/add-vk-share-for-topics/77428 "2018-01-07T22:23:24Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)\
**Post date:** [June 13, 2018, 11:29am UTC](https://meta.discourse.org/t/add-vk-share-for-topics/77428/4 "2018-06-13T11:29:51Z")

</div>

@techAPJ could you review this please:

[https://github.com/discourse/discourse/pull/5991](https://github.com/discourse/discourse/pull/5991)

It will allow to have this code:

```plaintext
<script type="text/discourse-plugin" version="0.8.23">
  api.addSharingSource({
    id: "vk",
    icon: "vk",
    generateUrl: function(link, title) {
      return "http://vk.com/share.php?url=" + encodeURIComponent(link) + "&title=" + 
encodeURIComponent(title);
    },
    shouldOpenInPopup: true,
    popupHeight: 265
  })
</script>

```

Which will display the VK sharing icon correctly:

 ![17](https://global.discourse-cdn.com/meta/original/3X/b/6/b695a3dd3fdd138ea0fc4a216214abfd05c46920.png)

Concerning this pull request, reading it you will notice that I added a method to bypass the existing site setting. The reasoning behind is that it’s probably a very good use case for theme components, that way we can keep core sharing methods (google+/facebook/twitter/email) and admin can decide which one he wants to show. But, plugins and theme components can have more control and extend the site setting if only some users wants to use a theme component to have sharing to specific third party.

---

_[View the full topic](https://meta.discourse.org/t/add-vk-share-for-topics/77428)._
