Thursday, May 24, 2012
Google +1 Button has already been launched since a few months ago. The button itself has a function that is some what alike to Facebook Like Button. But, there is another advantage that you'd probably get from this Google+ button, is that the post +1'd will be a priority on Google Search Result in a particular condition. Let's say, if you'd +1'd a post on a site, then the post which you'd +1'd could be suggested by Google on the search result in case your friend performs a search on google for something related, smells, or similar to the post you'd +1'd. Such, it somehow makes effect on Google SERP (Search Result Page).

For bloggers, the button's been integrated on the dashboard. It means if you're a blogger user, you can activate the service just by activating the "Share" function on your blog. - Here is how: go to your Blogger Dashboard and then visit the Design/Layout page. After, click on the "Edit" below the Page Element "Blog Posts", and then check the "Show Share Buttons" of the option, and then click Save.

Lately, i also find another function due to this Google+ button that seems have to be activated. Try to visit your New Blogger Setting Tab and go to the "Post And Comment" configuration. There you'll find what i mean here.

Out of all above, there is also a manual way that you can make. The code isn't realy too long. Here we go.

1. Javascript To Render The Button: There is a few options to choose, but here i'll tell you only two scripts.

Normally placed just above the tag < /head> or < /body>.

*Basic Code.

< script src="https://apis.google.com/js/plusone.js" type="text/javascript">
{lang: 'US'};
< /script>


*Advanced Code.

< script type="text/javascript">
window.___gcfg = {lang: 'US'}; window.___gapisync = false;
(function() {var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/plusone.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
< /script>

Google said, the first script above will run a little slower. And such, it will probably affect the page load.

2. Html Code To Call The Button: Choose whichever you think prefferable.

Normally placed below each post. In this case, place the code below after the tag < data:post.body/>. There could be two of the above tag, choose the first one.

1.1. < g:plusone>< /g:plusone>

1.2. < g:plusone size='standard' expr:href='data:post.url'>< /g:plusone>

1.3. < div class='g-plusone' data-size='medium' expr:href='data:post.url'>< /div>

*The button size is measured by these values: standard, medium, or small.

Just, don't ask me why i don't implement +1 button here. :D

0 comments:

Post a Comment