WHY USE IT ON YOUR JOOMLA SITE?

Even though Google is the no. 1 search engine, there has been something missing, and that's the direct user-interaction.

The Facebook Like and Share buttons have become a standard for sharing content with your friends. Now, I see no reason why the Google +1 button won't be of equal, albeit different, importance.

 

Google tried to launch Google Buzz a while ago, but this didn't take off as they expected. Thus, they turned around and created the +1 button. In my opinion, it seems like a much better idea.

Major sites like Mashable have already implemented the button and Google is actively marketing the functionality.

The +1 button can appear in a variety of places, both on Google and on sites across the web. For example, you might see a +1 button for a Google search result, Google ad, or next to an article you're reading on your favorite news site. Your +1’s and your social connections also help improve the content you see in Google Search.

The +1 button is currently only available for English searches on Google.com, but I guess they will implement the feature on other language searches as well pretty soon.

So if you want to have users recommend your pages on Google - you need to implement a Google +1 Joomla button as soon as possible.

 

HOW TO ADD THE GOOGLE +1 BUTTON IN YOUR JOOMLA SITE

To use Google +1 button on your site, you need to add two pieces of code:

  • A Javascript snippet fetching the code from Google
  • A tag for rendering the button where you want it to appear

THE JAVASCRIPT SNIPPET

This is the Javascript snippet that needs to go on every page where the +1 button should appear (place this tag in your head or just before your close body tag):

1.<script src="/http://apis.google.com/js/plusone.js" type="text/javascript"></script>

To add this code to your site, you have two options:

  1. Add it manually to your template index.php file (found in /templates/YOURTEMPLATE/)
  2. Add a module containing the snippet using this method (recommended)

THE +1 BUTTON TAG

The actual button code (place this tag where you want the +1 button to render):

1.<g:plusone size="medium"></g:plusone>

This actual code renders the standard +1 button code. There are several types of buttons to choose from, and you can visit the Google +1 button configuration tool to choose what kind of button you want.

To add the tag to your Joomla articles, you need to put it into a Joomla template override for the com_content article view. If this is Greek to you, please read my article about Joomla template overrides first.

You need to add the above tag to the /templates/YOURTEMPLATE/html/com_content/article/default.php file.

You might also consider adding some CSS to the tag to have it display the way you want to. For instance, place the tag in a DIV with the class name 'gplusone': <div class="gplusone">The tag</div>. In this example your button will be placed to the right side of the text it preceeds:

1.div.gplusone {
2.float:right;
3.margin-left:20px;
4.margin-bottom:20px;
5.}

As you can see, it's quite easy to add the button to your Joomla articles. A good place to add the button could be just after the article text.

 

Related Articles

comments powered by Disqus