Index: /extensions/GooglePlusOne/admin.php
===================================================================
--- /extensions/GooglePlusOne/admin.php	(revision 11600)
+++ /extensions/GooglePlusOne/admin.php	(revision 11600)
@@ -0,0 +1,32 @@
+<?php
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+global $conf, $template, $page;
+
+load_language('plugin.lang', GPLUS1_PATH);
+$conf['GooglePlusOne'] = explode(',', $conf['GooglePlusOne']);
+
+if (isset($_POST['submit']))
+{
+  $conf['GooglePlusOne'] = array(
+    $_POST['button_size'],
+    $_POST['position'],
+    );
+  
+  conf_update_param('GooglePlusOne', implode(',', $conf['GooglePlusOne']));
+  array_push($page['infos'], l10n('Information data registered in database'));
+  
+  // the prefilter changes, we must delete compiled templatess
+  $template->delete_compiled_templates();
+}
+
+$template->assign(array(
+  'button_size' => $conf['GooglePlusOne'][0],
+  'position' => $conf['GooglePlusOne'][1],
+  'GPLUS1_PATH' => GPLUS1_PATH,
+));
+
+$template->set_filename('gplus1_content', dirname(__FILE__).'/admin.tpl');
+$template->assign_var_from_handle('ADMIN_CONTENT', 'gplus1_content');
+
+?>
Index: /extensions/GooglePlusOne/admin.tpl
===================================================================
--- /extensions/GooglePlusOne/admin.tpl	(revision 11600)
+++ /extensions/GooglePlusOne/admin.tpl	(revision 11600)
@@ -0,0 +1,48 @@
+{combine_css path=$GPLUS1_PATH|@cat:"style.css"}
+
+<div class="titrePage">
+	<h2>Google+1</h2>
+</div>
+
+<form method="post" action="" class="properties" ENCTYPE="multipart/form-data"> 
+
+    <table class="gplus1_buttons">
+      <tr>
+        <td><label>
+          <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>
+          <img src="{$GPLUS1_PATH}images/medium.png"/>
+          <input type="radio" name="button_size" value="medium" {if $button_size == 'medium'}checked="checked"{/if}/>
+        </label></td>
+      </tr>
+      <tr>
+        <td><label>
+          <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>
+          <img src="{$GPLUS1_PATH}images/tall.png"/>
+          <input type="radio" name="button_size" value="tall" {if $button_size == 'tall'}checked="checked"{/if}/>
+        </label></td>
+      </tr>
+      
+      <tr class="property">
+        <td>
+          {'Button position on picture page'|@translate}
+        </td>
+        <td>
+          <label><input type="radio" name="position" value="top" {if $position == 'top'}checked="checked"{/if}/> {'Top'|@translate}</label>
+          <label><input type="radio" name="position" value="bottom" {if $position == 'bottom'}checked="checked"{/if}/> {'Bottom'|@translate}</label>
+          <label><input type="radio" name="position" value="toolbar" {if $position == 'toolbar'}checked="checked"{/if}/> {'Toolbar'|@translate}</label>
+        </td>
+      </tr>
+      <tr class="submit">
+        <td colspan="2">
+          <input class="submit" type="submit" value="{'Submit'|@translate}" name="submit" />
+        </td>
+      </tr>
+    </table>
+
+</form>
Index: /extensions/GooglePlusOne/images/index.php
===================================================================
--- /extensions/GooglePlusOne/images/index.php	(revision 11600)
+++ /extensions/GooglePlusOne/images/index.php	(revision 11600)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based photo gallery                                    |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2011 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 |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/GooglePlusOne/index.php
===================================================================
--- /extensions/GooglePlusOne/index.php	(revision 11600)
+++ /extensions/GooglePlusOne/index.php	(revision 11600)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based photo gallery                                    |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2011 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 |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/GooglePlusOne/language/cs_CZ/index.php
===================================================================
--- /extensions/GooglePlusOne/language/cs_CZ/index.php	(revision 11600)
+++ /extensions/GooglePlusOne/language/cs_CZ/index.php	(revision 11600)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2010 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 |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/GooglePlusOne/language/cs_CZ/plugin.lang.php
===================================================================
--- /extensions/GooglePlusOne/language/cs_CZ/plugin.lang.php	(revision 11600)
+++ /extensions/GooglePlusOne/language/cs_CZ/plugin.lang.php	(revision 11600)
@@ -0,0 +1,8 @@
+<?php
+
+$lang['Button position on picture page'] = 'Pozice tlačítka na stránce s fotografií';
+$lang['Top'] = 'Nahoře';
+$lang['Bottom'] = 'Dole';
+$lang['Toolbar'] = 'Panel nástrojů';
+
+?>
Index: /extensions/GooglePlusOne/language/en_UK/description.txt
===================================================================
--- /extensions/GooglePlusOne/language/en_UK/description.txt	(revision 11600)
+++ /extensions/GooglePlusOne/language/en_UK/description.txt	(revision 11600)
@@ -0,0 +1,1 @@
+Add a "+1" Google button
Index: /extensions/GooglePlusOne/language/en_UK/index.php
===================================================================
--- /extensions/GooglePlusOne/language/en_UK/index.php	(revision 11600)
+++ /extensions/GooglePlusOne/language/en_UK/index.php	(revision 11600)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2010 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 |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/GooglePlusOne/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/GooglePlusOne/language/en_UK/plugin.lang.php	(revision 11600)
+++ /extensions/GooglePlusOne/language/en_UK/plugin.lang.php	(revision 11600)
@@ -0,0 +1,8 @@
+<?php
+
+$lang['Button position on picture page'] = 'Button position on picture page';
+$lang['Top'] = 'Top';
+$lang['Bottom'] = 'Bottom';
+$lang['Toolbar'] = 'Toolbar';
+
+?>
Index: /extensions/GooglePlusOne/language/es_ES/index.php
===================================================================
--- /extensions/GooglePlusOne/language/es_ES/index.php	(revision 11600)
+++ /extensions/GooglePlusOne/language/es_ES/index.php	(revision 11600)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2010 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 |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/GooglePlusOne/language/es_ES/plugin.lang.php
===================================================================
--- /extensions/GooglePlusOne/language/es_ES/plugin.lang.php	(revision 11600)
+++ /extensions/GooglePlusOne/language/es_ES/plugin.lang.php	(revision 11600)
@@ -0,0 +1,8 @@
+<?php
+
+$lang['Button position on picture page'] = 'Posición del botón en la página imagen';
+$lang['Top'] = 'Arriba';
+$lang['Bottom'] = 'Abajo';
+$lang['Toolbar'] = 'Barra de herramientas';
+
+?>
Index: /extensions/GooglePlusOne/language/fr_FR/description.txt
===================================================================
--- /extensions/GooglePlusOne/language/fr_FR/description.txt	(revision 11600)
+++ /extensions/GooglePlusOne/language/fr_FR/description.txt	(revision 11600)
@@ -0,0 +1,1 @@
+Ajoute un bouton Google "+1"
Index: /extensions/GooglePlusOne/language/fr_FR/index.php
===================================================================
--- /extensions/GooglePlusOne/language/fr_FR/index.php	(revision 11600)
+++ /extensions/GooglePlusOne/language/fr_FR/index.php	(revision 11600)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2010 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 |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/GooglePlusOne/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/GooglePlusOne/language/fr_FR/plugin.lang.php	(revision 11600)
+++ /extensions/GooglePlusOne/language/fr_FR/plugin.lang.php	(revision 11600)
@@ -0,0 +1,8 @@
+<?php
+
+$lang['Button position on picture page'] = 'Position du bouton sur la page image';
+$lang['Top'] = 'Haut';
+$lang['Bottom'] = 'Bas';
+$lang['Toolbar'] = 'Barre d\'outils';
+
+?>
Index: /extensions/GooglePlusOne/language/index.php
===================================================================
--- /extensions/GooglePlusOne/language/index.php	(revision 11600)
+++ /extensions/GooglePlusOne/language/index.php	(revision 11600)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2010 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 |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/GooglePlusOne/language/it_IT/index.php
===================================================================
--- /extensions/GooglePlusOne/language/it_IT/index.php	(revision 11600)
+++ /extensions/GooglePlusOne/language/it_IT/index.php	(revision 11600)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based photo gallery                                    |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2011 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 |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/GooglePlusOne/language/it_IT/plugin.lang.php
===================================================================
--- /extensions/GooglePlusOne/language/it_IT/plugin.lang.php	(revision 11600)
+++ /extensions/GooglePlusOne/language/it_IT/plugin.lang.php	(revision 11600)
@@ -0,0 +1,8 @@
+<?php
+
+$lang['Button position on picture page'] = 'Posizione del pultzante sulla pagina foto';
+$lang['Top'] = 'Alto';
+$lang['Bottom'] = 'Basso';
+$lang['Toolbar'] = 'Barra di tools';
+
+?>
Index: /extensions/GooglePlusOne/language/lv_LV/index.php
===================================================================
--- /extensions/GooglePlusOne/language/lv_LV/index.php	(revision 11600)
+++ /extensions/GooglePlusOne/language/lv_LV/index.php	(revision 11600)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2010 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 |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/GooglePlusOne/language/lv_LV/plugin.lang.php
===================================================================
--- /extensions/GooglePlusOne/language/lv_LV/plugin.lang.php	(revision 11600)
+++ /extensions/GooglePlusOne/language/lv_LV/plugin.lang.php	(revision 11600)
@@ -0,0 +1,8 @@
+<?php
+
+$lang['Button position on picture page'] = 'Pogas pozīcija attēla lapā'
+$lang['Top'] = 'Augšā';
+$lang['Bottom'] = 'Apakšā';
+$lang['Toolbar'] = 'Rīkjoslā';
+
+?>
Index: /extensions/GooglePlusOne/language/tr_TR/index.php
===================================================================
--- /extensions/GooglePlusOne/language/tr_TR/index.php	(revision 11600)
+++ /extensions/GooglePlusOne/language/tr_TR/index.php	(revision 11600)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2010 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 |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/GooglePlusOne/language/tr_TR/plugin.lang.php
===================================================================
--- /extensions/GooglePlusOne/language/tr_TR/plugin.lang.php	(revision 11600)
+++ /extensions/GooglePlusOne/language/tr_TR/plugin.lang.php	(revision 11600)
@@ -0,0 +1,8 @@
+<?php
+
+$lang['Button position on picture page'] = 'Resim sayfasindaki buton konumu';
+$lang['Top'] = 'Üst';
+$lang['Bottom'] = 'Alt';
+$lang['Toolbar'] = 'menübar';
+
+?>
Index: /extensions/GooglePlusOne/language/vi_VN/index.php
===================================================================
--- /extensions/GooglePlusOne/language/vi_VN/index.php	(revision 11600)
+++ /extensions/GooglePlusOne/language/vi_VN/index.php	(revision 11600)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2010 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 |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/GooglePlusOne/language/vi_VN/plugin.lang.php
===================================================================
--- /extensions/GooglePlusOne/language/vi_VN/plugin.lang.php	(revision 11600)
+++ /extensions/GooglePlusOne/language/vi_VN/plugin.lang.php	(revision 11600)
@@ -0,0 +1,8 @@
+<?php
+
+$lang['Button position on picture page'] = 'Vị trí nút trên trang ảnh';
+$lang['Top'] = 'Trên cùng';
+$lang['Bottom'] = 'Dưới cùng';
+$lang['Toolbar'] = 'Thanh công cụ';
+
+?>
Index: /extensions/GooglePlusOne/main.inc.php
===================================================================
--- /extensions/GooglePlusOne/main.inc.php	(revision 11600)
+++ /extensions/GooglePlusOne/main.inc.php	(revision 11600)
@@ -0,0 +1,122 @@
+<?php
+/*
+Plugin Name: Google+1
+Version: auto
+Description: Add a "+1" Google button
+Plugin URI: http://piwigo.org/ext/extension_view.php?eid=562
+Author: Mistic
+Author URI: http://www.strangeplanet.fr
+*/
+
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+define('GPLUS1_PATH' , PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/');
+
+load_language('plugin.lang', GPLUS1_PATH);
+add_event_handler('loc_end_picture', 'gplus1_add_button');
+add_event_handler('loc_end_index', 'gplus1_add_button');
+
+
+function gplus1_add_button() 
+{
+  global $conf, $template, $user;
+  
+  $conf['GooglePlusOne'] = explode(',', $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'
+    );
+  
+  if (script_basename() == 'picture')
+  {
+    $template->assign(array(
+      'GPLUS1_SIZE' => $conf['GooglePlusOne'][0],
+      'GPLUS1_POSITON' => $conf['GooglePlusOne'][1],
+    ));
+        
+    $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->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 ($conf['GooglePlusOne'][0] == 'tall')
+    {
+        $template->assign('GPLUS1_SIZE', 'standard');
+    }
+  }
+  
+  // button language
+  if ( in_array(substr($user['language'],0,2), $conf['GooglePlusOne']['lang']) )
+  {
+    $template->assign('GPLUS1_LANG', substr($user['language'],0,2));
+  }
+  else
+  {
+    $template->assign('GPLUS1_LANG', 'en-GB');
+  }
+}
+
+function gplus1_add_button_prefilter($content, &$smarty)
+{
+  global $template;
+  
+  switch ($template->get_template_vars('GPLUS1_POSITON'))
+  {
+    case 'top':
+      $search = '<div id="theImage">';
+      $replace = '<div><g:plusone size="{$GPLUS1_SIZE}"></g:plusone></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>';
+      break;
+      
+    case 'index':  
+      $search = '<ul class="categoryActions">';
+      $replace = '<li><g:plusone size="{$GPLUS1_SIZE}"></g:plusone></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);
+}
+
+
+if (script_basename() == 'admin')
+{
+  add_event_handler('get_admin_plugin_menu_links', 'gplus1_plugin_admin_menu');
+
+  function gplus1_plugin_admin_menu($menu)
+  {
+    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 11600)
+++ /extensions/GooglePlusOne/maintain.inc.php	(revision 11600)
@@ -0,0 +1,12 @@
+<?php
+function plugin_install()
+{ 
+  pwg_query('INSERT INTO '.CONFIG_TABLE.' (param,value,comment) VALUES ("GooglePlusOne","medium,toolbar","GooglePlusOne config");');
+}
+
+function plugin_uninstall()
+{
+  pwg_query('DELETE FROM '.CONFIG_TABLE.' WHERE param="GooglePlusOne" LIMIT 1;');
+}
+
+?>
Index: /extensions/GooglePlusOne/style.css
===================================================================
--- /extensions/GooglePlusOne/style.css	(revision 11600)
+++ /extensions/GooglePlusOne/style.css	(revision 11600)
@@ -0,0 +1,56 @@
+.gplus1_buttons {
+  border-spacing: 0px;
+  border:10px solid #f9f9f9;
+  border-radius:10px;
+  margin-bottom:20px;
+}
+
+.gplus1_buttons td {
+  padding:10px 40px;
+  background-color:#f9f9f9;
+  border:1px solid #f5f5f5;
+  border-right-color:#ddd;
+  border-bottom-color:#ddd;
+  text-align:center;
+  vertical-align:center;
+}
+.gplus1_buttons td:hover {
+  background-color:#efefef;
+}
+.gplus1_buttons tr td:last-child {
+  border-right:none;
+}
+.gplus1_buttons tr:last-child td {
+  border-bottom:none;
+}
+tr.property td, tr.submit td {
+  padding:10px 5px;
+}
+tr.property td:hover, tr.submit td:hover {
+  background-color:#f9f9f9;
+}
+tr.property td:first-child {
+  text-align:right;
+  font-weight:bold;
+}
+tr.property td:last-child {
+  text-align:left;
+}
+tr.submit input {
+  background-color: #F5F5F5;
+  border: 1px solid rgba(0, 0, 0, 0.1);
+  border-radius: 2px 2px 2px 2px;
+  color: #666666;
+  font-weight:bold;
+  height: 29px;
+  line-height: 27px;
+  min-width: 54px;
+  padding: 0 8px;
+  text-align: center;
+}
+tr.submit input:hover {
+  background-color: #F8F8F8;
+  border: 1px solid #C6C6C6;
+  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
+  color: #333333;
+}
