Monkey Raptor

Friday, August 23, 2013

Using VKontakte (ВКонтакте) Share Button for Blogger

VKontakte logo

VK — VKontakte — ВКонтакте, is the largest social network in Russia (second place for the most visited website after Yandex), and the second largest in the entire Europe after Facebook. It looks like the "previous" Facebook, but with crazy awesome efficient page load speed. Don't believe me? Try it out.

Founded by Pavel Durov, it was launched (BETA) in 2006. And until 2012, VK had more than 200 millions registered users. And it's still growing.

I'm gonna show you using the VK share button on Blogger. But, before you make your articles share-able for social network that mainly doesn't use English, you have to provide a translator plugin at your blog. There are Google Translate, Bing Translate, and other providers, or probably your own customized API from any of those providers.


Synchronous VK Button

  • Go to VK Share Button (link below this post).
  • Copy the JavaScript resource and rendering method. Or just use link, provide the url, then create your own button. If you're using the predefined JavaScript button, which is the easiest implementation, you will have more customization parameters.
  • Place (paste) it on your blog.

Using Default JavaScript Button

This is the resource
We can place it in the head section, or just above the JavaScript button element.
This is the button element rendering method:
We can also omit the comment delimiter, like so:
The comment delimiter is a method for "olden" browsers. For modern browsers, that isn't needed.

The default button looks like this:


Placement on Blogger HTML Editor

This is the entire code for the default VK share button
  • To place it below the post's content, look for <div class='post-footer'>, and paste the code before that.
  • To place it after the post's title, look for:
    <div class='post-header-line-1'/>
    </div>
    and paste the code after the closing </div>.
To implement the additional layout parameters, change the element rendering method to this:
Then alter the value of type and text for that.

Something like this, I'm using type:'round_nocount' and text:'share':


Asynchronous VK Button Example

This method is good for creating seamless loading of your page. You can observe the CSS, HTML element, and how the JavaScript library is loaded and then the final rendering.

Link

More parameters of VKontakte share button at VKontakte
Using VKontakte (ВКонтакте) Share Button for Blogger
http://monkeyraptor.johanpaul.net/2013/08/using-vkontakte-share-button-for-blogger.html

No comments

Post a Comment

Tell me what you think...