Index: /extensions/AddInfo/admin/admin.php
===================================================================
--- /extensions/AddInfo/admin/admin.php	(revision 7646)
+++ /extensions/AddInfo/admin/admin.php	(revision 7646)
@@ -0,0 +1,138 @@
+<?php
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+global $template, $conf, $user;
+include_once(PHPWG_ROOT_PATH .'admin/include/tabsheet.class.php');
+load_language('plugin.lang', ADDINFO_PATH);
+$my_base_url = get_admin_plugin_menu_link(__FILE__);
+
+// +-----------------------------------------------------------------------+
+// | Check Access and exit when user status is not ok                      |
+// +-----------------------------------------------------------------------+
+check_status(ACCESS_ADMINISTRATOR);
+
+//-------------------------------------------------------- sections definitions
+
+// Gestion des onglets
+if (!isset($_GET['tab']))
+    $page['tab'] = 'addinfo';
+else
+    $page['tab'] = $_GET['tab'];
+
+$tabsheet = new tabsheet();
+$tabsheet->add('addinfo',
+               l10n('addinfo_ajout'),
+               $my_base_url.'&amp;tab=addinfo');
+$tabsheet->add('explication',
+               l10n('explication'),
+               $my_base_url.'&amp;tab=explication');
+$tabsheet->select($page['tab']);
+$tabsheet->assign();
+
+switch ($page['tab'])
+{
+// Onglet gestion de onglet addinfo
+  case 'addinfo':
+
+//charge la liste des images
+$groups = array();
+$query = '
+select id,name
+  FROM ' . IMAGES_TABLE . '
+  ORDER BY id ASC;';
+$result = pwg_query($query);
+
+while ($row = mysql_fetch_array($result))
+	{
+  $groups[$row['id']] = $row['id'].' : '.$row['name'];
+	}
+	
+	$selected = 0;
+	$options[] = l10n('addinfo_selecti3');
+	$options['a'] = '----------------------';
+	
+foreach($groups as $listid => $listid2)
+	{
+    $options[$listid] = $listid2;
+	}
+  $template->assign(
+    'addinfoo1',
+    array(
+	  'OPTIONS' => $options,
+      'SELECTED' => $selected
+      ));
+	
+//edit des imfos complèmentaire de l'image
+if (isset($_POST['submitchoiximg'])and is_numeric($_POST['addinfoimg']) and (!$_POST['addinfoimg'])==0 and !is_adviser())
+	{
+$lire=$_POST['addinfoimg'];
+	$query = '
+select id,name,path
+  FROM ' . IMAGES_TABLE . '
+  WHERE id = \''.$lire.'\'
+  ;';
+$result = pwg_query($query);
+
+$row = mysql_fetch_array($result);
+$idimg=$row['id'];
+$chnameimg=$row['name'];
+$rootimg=$row['path'];
+
+$query = '
+select id,info1,info2,info3
+  FROM ' . ADDINFO_TABLE . '
+  WHERE id = \''.$lire.'\'
+  ;';
+$result = pwg_query($query);
+$row = mysql_fetch_array($result);
+$idaddinfo=$row['id'];
+$info1=$row['info1'];
+$info2=$row['info2'];
+$info3=$row['info3'];
+
+  $selected3 = 0;
+  
+  $template->assign(
+    'img_edit',
+    array(
+	  'RIMG' => $rootimg,
+      'VALUE' => $idimg,
+	  'VALUEN' => $chnameimg,
+      'CONTENT' => $info1,
+      'CONTENT2' => $info2,
+	  'CONTENT3' => $info3,
+      'SELECTED' => $selected3
+      ));
+	}
+
+//insértion les information dans la table addinfo_picture
+if (isset($_POST['submitinsimg']) and !is_adviser())
+	{
+	$query = '
+DELETE 
+  FROM ' . ADDINFO_TABLE . '
+  WHERE id = \''.$_POST['invisible'].'\'
+  ;';
+$result = pwg_query($query);
+	$q = '
+INSERT INTO ' . $prefixeTable . 'AddInfo_images(id,info1,info2,info3)VALUES ('.$_POST['invisible'].',"'.$_POST['inser'].'","'.$_POST['inser2'].'","'.$_POST['inser3'].'");';
+    pwg_query($q);
+	}
+	
+    break;
+
+// Onglet  en attente
+  case 'explication':
+  $explication = 'explication';
+$template->assign(
+	$explication,
+	array(
+	  'meta'=>l10n('meta_name'),
+	  ));
+  
+	break;
+	
+} 
+
+$template->set_filenames(array('plugin_admin_content' => dirname(__FILE__) . '/admin.tpl')); 
+$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
+?>
Index: /extensions/AddInfo/admin/admin.tpl
===================================================================
--- /extensions/AddInfo/admin/admin.tpl	(revision 7646)
+++ /extensions/AddInfo/admin/admin.tpl	(revision 7646)
@@ -0,0 +1,61 @@
+<div class="titrePage">
+  <h2>{'addinfo_h2'|@translate}</h2>
+</div>
+
+{if isset ($addinfoo1)}
+	  <h3>{'addinfo_img'|@translate}</h3>
+	<div>
+		<form method="post" >
+			<fieldset>
+				<legend>{'addinfo_selectimg'|@translate}</legend>
+				{'addinfo_listimg'|@translate}	
+		{html_options name="addinfoimg" options=$addinfoo1.OPTIONS selected=$addinfoo1.SELECTED}
+				<br>
+				<br>
+					<div style="text-align:center;">
+					<input class="submit" name="submitchoiximg" type="submit" value="{'addinfo_choiximg'|@translate}" {$TAG_INPUT_ENABLED} />
+					</div>
+			</fieldset>
+		</form>
+	</div>
+	{if isset ($img_edit)}
+	<div>
+		<form method="post" >
+			<fieldset>
+			  <img class="thumbnail" src="{$img_edit.RIMG}" alt="" width="100px">
+			  <br>
+			  <br>
+				<legend>id&nbsp;:&nbsp;{$img_edit.VALUE}&nbsp;->&nbsp;{$img_edit.VALUEN}&nbsp;&nbsp;</legend>
+					<input type="hidden" name="invisible" value="{$img_edit.VALUE}">
+					{'addinfo_info1'|@translate}&nbsp;:<br>
+					<input type="text" name="inser" value="{$img_edit.CONTENT}" size="110" maxlenght="110">
+				<br>	
+				<br>
+					{'addinfo_info2'|@translate}&nbsp;:<br>
+					<input type="text" name="inser2" value="{$img_edit.CONTENT2}" size="110" maxlenght="110">
+				<br>	
+				<br>
+					{'addinfo_info3'|@translate}&nbsp;:<br>
+					<input type="text" name="inser3" value="{$img_edit.CONTENT3}" size="110" maxlenght="110">
+				<br>	
+				<br>
+					<div style="text-align:center;">
+					<input class="submit" name="submitinsimg" type="submit" value="{'addinfo_insing'|@translate}" {$TAG_INPUT_ENABLED} />
+					</div>
+			</fieldset>
+		</form>
+	</div>
+	{/if}
+{/if}
+
+{if isset ($explication)}
+	<div class="comment">
+		<h3>{'addinfo_explication'|@translate}</h3>
+			{'addinfo_explication_help'|@translate}
+	</div>
+	<br><br>
+	<div class="comment">
+		<h3>{'addinfo_explication_update non'|@translate}</h3>
+			{'addinfo_explication_update non_help'|@translate}
+	</div>
+{/if}
Index: /extensions/AddInfo/admin/index.php
===================================================================
--- /extensions/AddInfo/admin/index.php	(revision 7646)
+++ /extensions/AddInfo/admin/index.php	(revision 7646)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2009 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/AddInfo/index.php
===================================================================
--- /extensions/AddInfo/index.php	(revision 7646)
+++ /extensions/AddInfo/index.php	(revision 7646)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2009 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/AddInfo/language/fr_FR/description.txt
===================================================================
--- /extensions/AddInfo/language/fr_FR/description.txt	(revision 7646)
+++ /extensions/AddInfo/language/fr_FR/description.txt	(revision 7646)
@@ -0,0 +1,1 @@
+Ajoute 3 informations pour la description des images
Index: /extensions/AddInfo/language/fr_FR/index.php
===================================================================
--- /extensions/AddInfo/language/fr_FR/index.php	(revision 7646)
+++ /extensions/AddInfo/language/fr_FR/index.php	(revision 7646)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2009 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/AddInfo/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/AddInfo/language/fr_FR/plugin.lang.php	(revision 7646)
+++ /extensions/AddInfo/language/fr_FR/plugin.lang.php	(revision 7646)
@@ -0,0 +1,30 @@
+<?php
+//ADMIN
+$lang['addinfo_h2'] = 'Gestion d\'information complèmentaire sur la page des photos';
+
+//onglet addinfo
+$lang['addinfo_ajout'] = 'Ajouter les information aux photos';
+$lang['addinfo_selecti3'] = 'Sélectionnez la photo';
+$lang['addinfo_img'] = 'Ajouter des information aux photos';
+$lang['addinfo_selectimg'] = 'Sélectionnez la photo';
+$lang['addinfo_listimg'] = 'Liste des images';
+$lang['addinfo_choiximg'] = 'Éditer les information suplèmentaire de la photo';
+$lang['addinfo_insing'] = 'insérer les valeurs dans la base';
+
+//onglet explication
+$lang['addinfo_explication'] = 'Présentation';
+$lang['addinfo_explication_help'] = 'Ce plugin est un exemple pour ajouter des information sur les photos, pour votre utilisation, il va falloir l\'adapter';
+$lang['addinfo_explication_update non'] = 'Remplacement de INFO1, INFO2, INFO3';
+$lang['addinfo_explication_update non_help'] = 'Pour cela dans votre fichier local de langue, vous devez ajouter :<br>
+$lang[\'addinfo_info1\'] = \'nom que vou voulez pour infos1\'; <br>
+$lang[\'addinfo_info2\'] = \'nom que vou voulez pour infos2\'; <br>
+$lang[\'addinfo_info3\'] = \'nom que vou voulez pour infos3\'; <br>
+';
+
+//onglet addinfo et admin info
+$lang['addinfo_info1'] = 'INFO1';
+$lang['addinfo_info2'] = 'INFO2';
+$lang['addinfo_info3'] = 'INFO3';
+
+
+?>
Index: /extensions/AddInfo/language/index.php
===================================================================
--- /extensions/AddInfo/language/index.php	(revision 7646)
+++ /extensions/AddInfo/language/index.php	(revision 7646)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2009 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/AddInfo/main.inc.php
===================================================================
--- /extensions/AddInfo/main.inc.php	(revision 7646)
+++ /extensions/AddInfo/main.inc.php	(revision 7646)
@@ -0,0 +1,95 @@
+<?php
+/*
+Plugin Name: AddInfo
+Version: auto
+Description: Permet d'ajouter 3 infos sous les photos
+Plugin URI: http://piwigo.org/ext/extension_view.php?eid=461
+Author: ddtddt
+Author URI: 
+*/
+
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+global $prefixeTable;
+
+define('ADDINFO_DIR' , basename(dirname(__FILE__)));
+define('ADDINFO_PATH' , PHPWG_PLUGINS_PATH . ADDINFO_DIR . '/');
+define('ADDINFO_TABLE' , $prefixeTable . 'AddInfo_images');
+
+//Ajout du menu admin
+add_event_handler('get_admin_plugin_menu_links', 'addinfo_admin_menu');
+function addinfo_admin_menu($menu)
+{
+  array_push($menu, array(
+	'NAME' => 'AddInfo',
+    'URL' => get_admin_plugin_menu_link(ADDINFO_PATH . 'admin/admin.php')));
+  return $menu;
+}
+
+//Ajout du prefiltre
+
+add_event_handler('loc_begin_picture', 'adddinfoI', 55 );
+
+function adddinfoI()
+ {
+	global $template;
+	$template->set_prefilter('picture', 'adddinfoIT');
+ }
+
+function adddinfoIT($content, &$smarty)
+ {
+  $search = '#<tr id="datecreate">#';
+  
+  $replacement = '
+  <tr id="info1">
+    <td class="label">{\'addinfo_info1\'|@translate}</td>
+    <td class="value">{$INFO1}</td>
+  </tr>
+  <tr id="info2">
+    <td class="label">{\'addinfo_info2\'|@translate}</td>
+    <td class="value">{$INFO2}</td>
+  </tr>
+  <tr id="info3">
+    <td class="label">{\'addinfo_info3\'|@translate}</td>
+    <td class="value">{$INFO3}</td>
+  </tr>
+<tr id="datecreate">';
+
+  return preg_replace($search, $replacement, $content);
+ }
+
+add_event_handler('loc_begin_picture', 'addInfoT');
+
+function addInfoT()
+{
+global $conf, $page, $template, $tab, $cit, $nbr  ;
+load_language('plugin.lang', ADDINFO_PATH);
+
+  // Affichage du bloc uniquement sur les page des photos
+  if ( !empty($page['image_id']) )   
+  {
+ 
+  $query = '
+select id,info1,info2,info3
+  FROM ' . ADDINFO_TABLE . '
+  WHERE id = \''.$page['image_id'].'\'
+  ;';
+$result = pwg_query($query);
+$row = mysql_fetch_array($result);
+$idaddinfo=$row['id'];
+$info1=$row['info1'];
+$info2=$row['info2'];
+$info3=$row['info3'];
+    
+    // Envoi des données au template
+	    $template->assign	(
+		array	(
+		'INFO1' => $info1,
+		'INFO2' => $info2,
+		'INFO3' => $info3
+				)			);
+  }
+}
+
+
+?>
Index: /extensions/AddInfo/maintain.inc.php
===================================================================
--- /extensions/AddInfo/maintain.inc.php	(revision 7646)
+++ /extensions/AddInfo/maintain.inc.php	(revision 7646)
@@ -0,0 +1,29 @@
+<?php
+
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+function plugin_install()
+{
+    global $prefixeTable;
+
+if (!defined('ADDINFO_TABLE')) define('ADDINFO_TABLE', $prefixeTable.'AddInfo_images');
+	$query = "CREATE TABLE IF NOT EXISTS ". ADDINFO_TABLE ." (
+id SMALLINT( 5 ) UNSIGNED NOT NULL ,
+info1 VARCHAR( 255 ) NOT NULL ,
+info2 VARCHAR( 255 ) NOT NULL ,
+info3 VARCHAR( 255 ) NOT NULL ,
+PRIMARY KEY (id))DEFAULT CHARSET=utf8;";
+	$result = pwg_query($query);
+
+}
+
+function plugin_uninstall()
+{
+	global $prefixeTable;
+
+	$q = 'DROP TABLE ' . $prefixeTable . 'AddInfo_images;';
+    pwg_query($q);
+}
+
+
+?>
