Index: /extensions/AddInfo/initadmin.php
===================================================================
--- /extensions/AddInfo/initadmin.php	(revision 9152)
+++ /extensions/AddInfo/initadmin.php	(revision 9152)
@@ -0,0 +1,117 @@
+<?php
+
+//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 image
+
+add_event_handler('loc_begin_admin', 'Imodadminf',55);
+add_event_handler('loc_begin_admin', 'ImodadminA',55);
+
+
+function Imodadminf()
+ {
+	global $template;
+	$template->set_prefilter('picture_modify', 'ImodadminfT');
+ }
+
+function ImodadminfT($content, &$smarty)
+ {
+ 
+ load_language('plugin.lang', ADDINFO_PATH);
+ 
+
+  $search = '#<form id="associations"#';
+  
+  $replacement = '
+		<form method="post" >
+  			<fieldset>
+			  <br>
+			  <br>
+				<legend>{\'addinfo_complete\'|@translate}</legend>
+					{\'addinfo_info1\'|@translate}&nbsp;:<br>
+					<input type="text" name="inser" value="{$AICONTENT}" size="110" maxlenght="110">
+				<br>	
+				<br>
+					{\'addinfo_info2\'|@translate}&nbsp;:<br>
+					<input type="text" name="inser2" value="{$AICONTENT2}" size="110" maxlenght="110">
+				<br>	
+				<br>
+					{\'addinfo_info3\'|@translate}&nbsp;:<br>
+					<input type="text" name="inser3" value="{$AICONTENT3}" 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>  
+  <form id="associations"';
+
+  return preg_replace($search, $replacement, $content);
+ }
+ 
+function ImodadminA()
+ { 
+ 
+ load_language('plugin.lang', ADDINFO_PATH);
+ load_language('lang', PHPWG_ROOT_PATH.'local/', array('no_fallback'=>true, 'local'=>true) );
+
+if (isset($_GET['image_id']))
+ {
+ $query = '
+select id,info1,info2,info3
+  FROM ' . ADDINFO_TABLE . '
+  WHERE id = '.$_GET['image_id'].'
+  ;';
+$result = pwg_query($query);
+$row = mysql_fetch_array($result);
+$idaddinfo=$row['id'];
+$info1=$row['info1'];
+$info2=$row['info2'];
+$info3=$row['info3'];
+	global $template, $prefixeTable;
+
+$template->assign(
+    array(
+      //'AIVALUE' => $idaddinfo,
+      'AICONTENT' => $info1,
+      'AICONTENT2' => $info2,
+	  'AICONTENT3' => $info3,
+      ));
+ 
+if (isset($_POST['submitinsimg']))
+	{
+	$query = '
+DELETE 
+  FROM ' . ADDINFO_TABLE . '
+  WHERE id = '.$_GET['image_id'].'
+  ;';
+$result = pwg_query($query);
+	$q = '
+INSERT INTO ' . $prefixeTable . 'AddInfo_images(id,info1,info2,info3)VALUES ('.$_GET['image_id'].',"'.$_POST['inser'].'","'.$_POST['inser2'].'","'.$_POST['inser3'].'");';
+    pwg_query($q);
+	
+	$template->assign(
+    array(
+      'AICONTENT' => $_POST['inser'],
+      'AICONTENT2' => $_POST['inser2'],
+	  'AICONTENT3' => $_POST['inser3'],
+      ));
+
+}	  
+	
+	
+	
+	
+	}
+	
+}
+?>
Index: /extensions/AddInfo/initpicture.php
===================================================================
--- /extensions/AddInfo/initpicture.php	(revision 9152)
+++ /extensions/AddInfo/initpicture.php	(revision 9152)
@@ -0,0 +1,68 @@
+<?php
+
+//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);
+load_language('lang', PHPWG_ROOT_PATH.'local/', array('no_fallback'=>true, 'local'=>true) );
+
+  // 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
+				)			);
+  }
+}
+
+?>
