Google +1 Button Web Part for Kentico CMS
My latest Kentico CMS Web Part
This post is intended to introduce my latest web part that I have created for Kentico CMS. This new web part wraps up all the logic you need to add a Google +1 button to your Kentico CMS pages or page templates.
Background
Over the past few days I have been reading more and more about the new Google+ service that reportedly is going to be the next Facebook killer in the social media world.
Google is attempting to integrate more social features into your search results all the time. It is speculated that eventually your Google +1 likes and dislikes will become part of your connections' search results once all these services are tied together. It is an interesting possibility and one that I feel has a better chance for competing against Facebook’s empire.
So as a result of this surge of popularity, I decided it was time for a nice simple Kentico CMS web part to do the job. It kind of falls in line with some of the other great Kentico CMS social media button web parts for the Facebook Like functionality, and Tweet this functionality.
How it Works
The web part is actually a simple one. As you might guess, it really just renders out the correct two lines of html that you need to implement the Google +1 button. The source of the html and the specs to use it can be found on the Google Webmasters page about the +1 button itself. The code below is an example of how easy it can be using all defaults.
<script type="text/javascript" src="…plusone.js">script> <g:plusone>g:plusone>
The Result
After placing the web part on your page or page template you should now see the Google +1 button.
Web Part Properties
The web part itself has a few properties that mimic the options Google presents. There are a few size choices, a yes/no checkbox to hide or show the Count, and a client side callback function name can be provided to trigger when a user +1’s your page. Finally there is a URL parameter if you want to force the URL manually instead of relying on Google’s method of figuring it out for you.
Download
You can download a copy of the Kentico CMS Google +1 Button web part here, as well as at the Kentico Marketplace. I have tested the web part in versions 5.5 and 5.5 R2.
Feedback
Feel free to leave any feedback on the module in the comments on this post. I will try to support it as best I can over email or comments.