Index: /extensions/GooglePlusOne/admin.php
===================================================================
--- /extensions/GooglePlusOne/admin.php	(revision 15120)
+++ /extensions/GooglePlusOne/admin.php	(revision 15121)
@@ -5,14 +5,15 @@
 
 load_language('plugin.lang', GPLUS1_PATH);
-$conf['GooglePlusOne'] = explode(',', $conf['GooglePlusOne']);
+$conf['GooglePlusOne'] = unserialize($conf['GooglePlusOne']);
 
 if (isset($_POST['submit']))
 {
   $conf['GooglePlusOne'] = array(
-    $_POST['button_size'],
-    $_POST['position'],
+    'size' => $_POST['button_size'],
+    'position' => $_POST['position'],
+    'annotation' => $_POST['annotation'],
     );
   
-  conf_update_param('GooglePlusOne', implode(',', $conf['GooglePlusOne']));
+  conf_update_param('GooglePlusOne', serialize($conf['GooglePlusOne']));
   array_push($page['infos'], l10n('Information data registered in database'));
   
@@ -22,6 +23,7 @@
 
 $template->assign(array(
-  'button_size' => $conf['GooglePlusOne'][0],
-  'position' => $conf['GooglePlusOne'][1],
+  'button_size' => $conf['GooglePlusOne']['size'],
+  'position' => $conf['GooglePlusOne']['position'],
+  'annotation' => $conf['GooglePlusOne']['annotation'],
   'GPLUS1_PATH' => GPLUS1_PATH,
 ));
Index: /extensions/GooglePlusOne/admin.tpl
===================================================================
--- /extensions/GooglePlusOne/admin.tpl	(revision 15120)
+++ /extensions/GooglePlusOne/admin.tpl	(revision 15121)
@@ -8,10 +8,18 @@
 
     <table class="gplus1_buttons">
+      <tr class="property">
+        <td>
+          {'Button size'|@translate}
+        </td>
+        <td></td>
+      </tr>
       <tr>
         <td><label>
+          15px
           <img src="{$GPLUS1_PATH}images/small.png"/>
           <input type="radio" name="button_size" value="small" {if $button_size == 'small'}checked="checked"{/if}/>
         </label></td>
         <td><label>
+          20px
           <img src="{$GPLUS1_PATH}images/medium.png"/>
           <input type="radio" name="button_size" value="medium" {if $button_size == 'medium'}checked="checked"{/if}/>
@@ -20,8 +28,10 @@
       <tr>
         <td><label>
+          24px
           <img src="{$GPLUS1_PATH}images/standard.png"/>
           <input type="radio" name="button_size" value="standard" {if $button_size == 'standard'}checked="checked"{/if}/>
         </label></td>
         <td><label>
+          60px
           <img src="{$GPLUS1_PATH}images/tall.png"/>
           <input type="radio" name="button_size" value="tall" {if $button_size == 'tall'}checked="checked"{/if}/>
@@ -39,4 +49,15 @@
         </td>
       </tr>
+      
+      <tr class="property">
+        <td>
+          {'Annotation'|@translate}
+        </td>
+        <td>
+          <label><input type="radio" name="annotation" value="none" {if $annotation == 'none'}checked="checked"{/if}/> {'None'|@translate}</label>
+          <label><input type="radio" name="annotation" value="bubble" {if $annotation == 'bubble'}checked="checked"{/if}/> {'Bubble'|@translate}</label>
+          <label><input type="radio" name="annotation" value="inline" {if $annotation == 'inline'}checked="checked"{/if}/> {'Inline text'|@translate}</label>
+        </td>
+      </tr>
       <tr class="submit">
         <td colspan="2">
Index: /extensions/GooglePlusOne/images/index.php
===================================================================
--- /extensions/GooglePlusOne/images/index.php	(revision 15120)
+++ /extensions/GooglePlusOne/images/index.php	(revision 15121)
@@ -3,5 +3,5 @@
 // | Piwigo - a PHP based photo gallery                                    |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2008-2011 Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2008-2012 Piwigo Team                  http://piwigo.org |
 // | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
 // | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
Index: /extensions/GooglePlusOne/index.php
===================================================================
--- /extensions/GooglePlusOne/index.php	(revision 15120)
+++ /extensions/GooglePlusOne/index.php	(revision 15121)
@@ -3,5 +3,5 @@
 // | Piwigo - a PHP based photo gallery                                    |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2008-2011 Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2008-2012 Piwigo Team                  http://piwigo.org |
 // | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
 // | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
Index: /extensions/GooglePlusOne/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/GooglePlusOne/language/en_UK/plugin.lang.php	(revision 15120)
+++ /extensions/GooglePlusOne/language/en_UK/plugin.lang.php	(revision 15121)
@@ -5,4 +5,8 @@
 $lang['Bottom'] = 'Bottom';
 $lang['Toolbar'] = 'Toolbar';
+$lang['Button size'] = 'Button size';
+$lang['Annotation'] = 'Annotation';
+$lang['Bubble'] = 'Bubble';
+$lang['Inline text'] = 'Inline text';
 
 ?>
Index: /extensions/GooglePlusOne/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/GooglePlusOne/language/fr_FR/plugin.lang.php	(revision 15120)
+++ /extensions/GooglePlusOne/language/fr_FR/plugin.lang.php	(revision 15121)
@@ -5,4 +5,8 @@
 $lang['Bottom'] = 'Bas';
 $lang['Toolbar'] = 'Barre d\'outils';
+$lang['Button size'] = 'Taille du bouton';
+$lang['Annotation'] = 'Annotation';
+$lang['Bubble'] = 'Bulle';
+$lang['Inline text'] = 'Texte simple';
 
 ?>
Index: /extensions/GooglePlusOne/main.inc.php
===================================================================
--- /extensions/GooglePlusOne/main.inc.php	(revision 15120)
+++ /extensions/GooglePlusOne/main.inc.php	(revision 15121)
@@ -22,34 +22,31 @@
   global $conf, $template, $user;
   
-  $conf['GooglePlusOne'] = explode(',', $conf['GooglePlusOne']);
+  $conf['GooglePlusOne'] = unserialize($conf['GooglePlusOne']);
   $conf['GooglePlusOne']['lang'] = array(
-    'ar','bg','ca','hr','cs','da','nl','et','fi','fr','de','el','iw','hi',
-    'hu','id','it','ja','ko','lv','lt','ms','no','fa','pl','ro','ru','sr',
-    'sk','sl','es','sv','th','tr','uk','vi'
+    'ar','bg','ca','zh-CN','zh-TW','hr','cs','da','nl','en-US','en-GB','et','fi','fr','de',
+    'el','iw','hi','hu','id','it','ja','ko','lv','lt','ms','no','fa','pl','pt-BR','pt-PT',
+    'ro','ru','sr','sk','sl','es','sv','th','tr','uk','vi',
     );
+    
+  $template->assign(array(
+    'GPLUS1_SIZE' => $conf['GooglePlusOne']['size'],
+    'GPLUS1_ANNO' => $conf['GooglePlusOne']['annotation'],
+  ));
   
   if (script_basename() == 'picture')
   {
-    $template->assign(array(
-      'GPLUS1_SIZE' => $conf['GooglePlusOne'][0],
-      'GPLUS1_POSITON' => $conf['GooglePlusOne'][1],
-    ));
-        
+    $template->assign('GPLUS1_POSITON', $conf['GooglePlusOne']['position']);
     $template->set_prefilter('picture', 'gplus1_add_button_prefilter');
   }
   else if (script_basename() == 'index')
   {
-    $template->assign(array(
-      'GPLUS1_SIZE' => $conf['GooglePlusOne'][0],
-      'GPLUS1_POSITON' => 'index',
-    ));
-        
+    $template->assign('GPLUS1_POSITON', 'index');
     $template->set_prefilter('index', 'gplus1_add_button_prefilter');
   }
   
   // if the link is in the toolbar, we must use smallier buttons
-  if ( script_basename() == 'index' OR  $conf['GooglePlusOne'][1] == 'toolbar')
+  if ( script_basename() == 'index' OR  $conf['GooglePlusOne']['position'] == 'toolbar')
   {
-    if ($conf['GooglePlusOne'][0] == 'tall')
+    if ($conf['GooglePlusOne']['size'] == 'tall' AND $conf['GooglePlusOne']['annotation'] == 'bubble')
     {
         $template->assign('GPLUS1_SIZE', 'standard');
@@ -58,4 +55,8 @@
   
   // button language
+  if ( in_array(str_replace('_','-',$user['language']), $conf['GooglePlusOne']['lang']) )
+  {
+    $template->assign('GPLUS1_LANG', str_replace('_','-',$user['language']));
+  }
   if ( in_array(substr($user['language'],0,2), $conf['GooglePlusOne']['lang']) )
   {
@@ -72,31 +73,30 @@
   global $template;
   
+  $replace = '{combine_script id=\'google_plusone\' path=\'https://apis.google.com/js/plusone.js\'}
+<script type="text/javascript">window.___gcfg = {ldelim}lang: \'{$GPLUS1_LANG}\'};</script>
+<g:plusone size="{$GPLUS1_SIZE}" annotation="{$GPLUS1_ANNO}"></g:plusone>';
+  
   switch ($template->get_template_vars('GPLUS1_POSITON'))
   {
     case 'top':
       $search = '<div id="theImage">';
-      $replace = '<div><g:plusone size="{$GPLUS1_SIZE}"></g:plusone></div>';
+      $replace = '<div>'.$replace.'</div>';
       break;
       
     case 'bottom':
       $search = '{$ELEMENT_CONTENT}';
-      $replace = '<g:plusone size="{$GPLUS1_SIZE}"></g:plusone>';
       break;
       
     case 'toolbar':
-      $search = '{*caddie management END*}';
-      $replace = '<g:plusone size="{$GPLUS1_SIZE}"></g:plusone>';
+      $search = '<div class="actionButtons">';
       break;
       
     case 'index':  
       $search = '<ul class="categoryActions">';
-      $replace = '<li><g:plusone size="{$GPLUS1_SIZE}"></g:plusone></li>';
+      $replace = '<li>'.$replace.'</li>';
       break;
   }
-  $replace = $search.$replace.'
-{combine_script id=\'google_plusone\' path=\'https://apis.google.com/js/plusone.js\'}
-<script type="text/javascript">{ldelim}lang: \'{$GPLUS1_LANG}\'}</script>';
 
-  return str_replace($search, $replace, $content);
+  return str_replace($search, $search.$replace, $content);
 }
 
@@ -108,12 +108,8 @@
   function gplus1_plugin_admin_menu($menu)
   {
-    array_push(
-      $menu,
-      array(
-        'NAME' => 'Google+1',
-        'URL' => get_root_url().'admin.php?page=plugin-'.basename(dirname(__FILE__))
-        )
-      );
-    
+    array_push($menu, array(
+      'NAME' => 'Google+1',
+      'URL' => get_root_url().'admin.php?page=plugin-'.basename(dirname(__FILE__))
+      ));
     return $menu;
   }
Index: /extensions/GooglePlusOne/maintain.inc.php
===================================================================
--- /extensions/GooglePlusOne/maintain.inc.php	(revision 15120)
+++ /extensions/GooglePlusOne/maintain.inc.php	(revision 15121)
@@ -1,6 +1,29 @@
 <?php
 function plugin_install()
-{ 
-  pwg_query('INSERT INTO '.CONFIG_TABLE.' (param,value,comment) VALUES ("GooglePlusOne","medium,toolbar","GooglePlusOne config");');
+{
+  $conf = array(
+    'size' => 'medium',
+    'position' => 'toolbar',
+    'annotation' => 'inline',
+    );
+      
+  conf_update_param('GooglePlusOne', serialize($conf));
+}
+
+function plugin_activate()
+{
+  global $conf;
+  
+  if (@unserialize($conf['GooglePlusOne']) === false)
+  {
+    $conf = explode(',', $conf['GooglePlusOne']);
+    $conf = array(
+      'size' => $conf[0],
+      'position' => $conf[1],
+      'annotation' => 'bubble',
+      );
+      
+    conf_update_param('GooglePlusOne', serialize($conf));
+  }
 }
 
