Compago

...free knowledge

 
  • Increase font size
  • Default font size
  • Decrease font size
Home Software Compago software Google Plus One plugin for Joomla

Google Plus One plugin for Joomla

Stampa PDF

The Plugin Google Plus One for Joomla enable the "+1 button" on your published articles, with the following features:

  • To choose the position (before, after or both the content).
  • To choose counter or no-counter button style.
  • To choose the button size.
  • To include and exclude certain articles and categories.
  • To set the CSS style for the container.
  • To set the container.
  • To enable the view where the button will be show up.

All these to give you more flexiblities.

The plugin +1 button is the most easy and complete way to include the Google share button +1 on your Joomla website.

Let a user share your content with Google with Google Plus One plugin!

 

The installation procedure is standard, then upload the zip file, enable the plugin and choose the options that you like more.

for Joomla 1.7;

Download the plugin Google Plus One for Joomla 1.7 v1.1(new)

for Joomla 1.6:

Download the plugin Google Plus One for Joomla 1.6 v1.1(new)
Download the plugin Google Plus One for Joomla 1.6 v1.0

for Joomla 1.5:

Download the plugin Google Plus One for Joomla 1.5 v1.1(new)
Download the plugin Google Plus One for Joomla 1.5 v1.0

 

This extension is freeware and you can modify the code as you prefer. For advanced options customization of +1 button on you web page please refer to this tutorial.

Notes for advanced users:

If you want to include the +1 button with the others icon buttons, like print, email buttons, you don't need of this plugin but you must change your template.

Then every changes depends on which template are you using, but the process is always the same.
In the base directory of your template, there are several subdirectories; one of these is the "html" directory. That folder include all the html files that you want override with your template.
The code about the article icon bar is in the com_content component, then you must choose that subdirectory, or if it doesn't exist you must creat it.
In the same way you must choose or create the article view folder. In this forlder you will find or you'll create two files:the index.html file, that it's an empty file and the file default.php that will override the homonymous file in the com_content component.

In this file you must insert some rows of code:

<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
<?php
 $url = JRoute::_(ContentHelperRoute::getArticleRoute($this->article->slug, $this->article->catslug, $this->article->sectionid));
 $uri = JURI::getInstance();
 $base  = $uri->toString( array('scheme', 'host', 'port'));
 $url = $base . $url;
 $url = JRoute::_($url, true, 0);
 echo "<g:plusone size=\"small\" href=\"$url\"></g:plusone>";
?>
 

Where you must put in that piece of code depends on your template, and you can customize the HTML container as you prefere:

<div class="buttonheading">
<span style="width:70px;valign:bottom;height:15px;float:right;margin: 7px 5px 0 0;">
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
<?php
 $url = JRoute::_(ContentHelperRoute::getArticleRoute($this->article->slug, $this->article->catslug, $this->article->sectionid));
 $uri = JURI::getInstance();
 $base  = $uri->toString( array('scheme', 'host', 'port'));
 $url = $base . $url;
 $url = JRoute::_($url, true, 0);
 echo "<g:plusone size=\"small\" href=\"$url\"></g:plusone>";
?>
</span>
...
 
 

The code above is for joomla 1.5 for the new version (1.6 and 1.7) you must use a bit different code:

<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
<?php
 $url = JRoute::_(ContentHelperRoute::getArticleRoute($this->article->id, $this->article->catid));
 $uri = JURI::getInstance();
 $base  = $uri->toString( array('scheme', 'host', 'port'));
 $url = $base . $url;
 $url = JRoute::_($url, true, 0);
 echo "<g:plusone size=\"small\" href=\"$url\"></g:plusone>";
?>
Ultimo aggiornamento ( Lunedì 12 Settembre 2011 09:16 )  
Loading

Login




Chiudi