Index: extensions/AddInfo/admin/admin.php
===================================================================
--- extensions/AddInfo/admin/admin.php	(revision 21629)
+++ extensions/AddInfo/admin/admin.php	(revision 21631)
@@ -23,4 +23,7 @@
                l10n('addinfo_explication'),
                $my_base_url.'&amp;tab=explication');
+$tabsheet->add('gestion',
+               l10n('Configuration'),
+               $my_base_url.'&amp;tab=gestion');
 $tabsheet->select($page['tab']);
 $tabsheet->assign();
@@ -39,4 +42,46 @@
 	break;
 	
+  case 'gestion':
+
+  global $conf;
+  
+    $selected = $conf['AddInfo'];
+	$options['Author'] = l10n('Author');
+	$options['datecreate'] = l10n('Created on');
+	$options['datepost'] = l10n('Posted on');
+	$options['Dimensions'] = l10n('Dimensions');
+	$options['File'] = l10n('File');
+	$options['Filesize'] = l10n('Filesize');
+	$options['Tags'] = l10n('tags');
+	$options['Categories'] = l10n('Albums');
+	$options['Visits'] = l10n('Visits');
+	$options['Average'] = l10n('Rating score');
+
+	
+
+  $template->assign(
+    'gestionA',
+    array(
+      'OPTIONS' => $options,
+      'SELECTED' => $selected
+      ));
+   
+
+if (isset($_POST['infoaddinfo']))
+	{
+conf_update_param('AddInfo', $_POST['infoaddinfo']);
+$template->delete_compiled_templates();
+array_push($page['infos'], l10n('Your configuration settings are saved'));
+
+  $selected = $_POST['infoaddinfo'];
+  $template->assign(
+    'gestionA',
+    array(
+      'OPTIONS' => $options,
+      'SELECTED' => $selected
+      ));
+	}
+  break;
+	
 } 
 
Index: extensions/AddInfo/admin/admin.tpl
===================================================================
--- extensions/AddInfo/admin/admin.tpl	(revision 21629)
+++ extensions/AddInfo/admin/admin.tpl	(revision 21631)
@@ -13,2 +13,17 @@
 	</div>
 {/if}
+{if isset ($gestionA)}
+	<div>
+		<form method="post" >
+			<fieldset>
+				<legend>{'Add information before'|@translate}</legend>
+		{html_options name="infoaddinfo" options=$gestionA.OPTIONS selected=$gestionA.SELECTED}
+				<br>	
+				<br>
+					<div style="text-align:center;">
+					<input class="submit" name="submitpab" type="submit" value="{'Save Settings'|@translate}">
+					</div>
+			</fieldset>
+		</form>
+	</div>
+{/if}
Index: extensions/AddInfo/initpicture.php
===================================================================
--- extensions/AddInfo/initpicture.php	(revision 21629)
+++ extensions/AddInfo/initpicture.php	(revision 21631)
@@ -12,5 +12,8 @@
 function adddinfoIT($content, &$smarty)
  {
-  $search = '#<div id="datepost" class="imageInfo">#';
+ 
+  global $conf;
+ 
+  $search = '#<div id="'.$conf['AddInfo'].'" class="imageInfo">#';
   
   $replacement = '
Index: extensions/AddInfo/language/ca_ES/plugin.lang.php
===================================================================
--- extensions/AddInfo/language/ca_ES/plugin.lang.php	(revision 21629)
+++ extensions/AddInfo/language/ca_ES/plugin.lang.php	(revision 21631)
@@ -34,3 +34,4 @@
 $lang['addinfo_h2'] = 'Gestió de la informació addicional a la secció Imatges';
 $lang['addinfo_insing'] = 'inserir els valors a la base de dades';
+$lang['Add information before'] = 'Abans afegiu informació';
 ?>
Index: extensions/AddInfo/language/da_DK/plugin.lang.php
===================================================================
--- extensions/AddInfo/language/da_DK/plugin.lang.php	(revision 21629)
+++ extensions/AddInfo/language/da_DK/plugin.lang.php	(revision 21631)
@@ -34,3 +34,4 @@
 $lang['addinfo_info3'] = 'INFO3';
 $lang['addinfo_insing'] = 'Indsæt værdierne i databasen';
+$lang['Add information before'] = 'Tilføj oplysninger før';
 ?>
Index: extensions/AddInfo/language/de_DE/plugin.lang.php
===================================================================
--- extensions/AddInfo/language/de_DE/plugin.lang.php	(revision 21629)
+++ extensions/AddInfo/language/de_DE/plugin.lang.php	(revision 21631)
@@ -15,4 +15,5 @@
 $lang[\'addinfo_info3\'] = \'Gewünschter Name für INFO3\'; <br>
 ';
+$lang['Add information before'] = 'Information davor hinzufügen';
 
 //onglet addinfo et admin info
Index: extensions/AddInfo/language/el_GR/plugin.lang.php
===================================================================
--- extensions/AddInfo/language/el_GR/plugin.lang.php	(revision 21629)
+++ extensions/AddInfo/language/el_GR/plugin.lang.php	(revision 21631)
@@ -34,3 +34,4 @@
 $lang['addinfo_info3'] = 'INFO3';
 $lang['addinfo_insing'] = 'τοποθετήστε τις τιμές στη βάση δεδομένων';
+$lang['Add information before'] = 'Προσθήκη πληροφοριών πριν';
 ?>
Index: extensions/AddInfo/language/en_UK/plugin.lang.php
===================================================================
--- extensions/AddInfo/language/en_UK/plugin.lang.php	(revision 21629)
+++ extensions/AddInfo/language/en_UK/plugin.lang.php	(revision 21631)
@@ -21,4 +21,6 @@
 $lang['addinfo_info3'] = 'INFO3';
 
+$lang['Add information before'] = 'Add information before';
+
 
 ?>
Index: extensions/AddInfo/language/es_ES/plugin.lang.php
===================================================================
--- extensions/AddInfo/language/es_ES/plugin.lang.php	(revision 21629)
+++ extensions/AddInfo/language/es_ES/plugin.lang.php	(revision 21631)
@@ -34,3 +34,4 @@
 $lang['addinfo_info3'] = 'INFO3';
 $lang['addinfo_insing'] = 'insertar los valores en la base de datos';
+$lang['Add information before'] = 'Agregar información antes';
 ?>
Index: extensions/AddInfo/language/fr_FR/plugin.lang.php
===================================================================
--- extensions/AddInfo/language/fr_FR/plugin.lang.php	(revision 21629)
+++ extensions/AddInfo/language/fr_FR/plugin.lang.php	(revision 21631)
@@ -21,4 +21,4 @@
 $lang['addinfo_info3'] = 'INFO3';
 
-
+$lang['Add information before'] = 'Ajouter l\'information avant';
 ?>
Index: extensions/AddInfo/language/it_IT/plugin.lang.php
===================================================================
--- extensions/AddInfo/language/it_IT/plugin.lang.php	(revision 21629)
+++ extensions/AddInfo/language/it_IT/plugin.lang.php	(revision 21631)
@@ -20,4 +20,5 @@
 $lang['addinfo_info2'] = 'INFO2';
 $lang['addinfo_info3'] = 'INFO3';
+$lang['Add information before'] = 'Aggiungi informazioni prima  ';
 
 
Index: extensions/AddInfo/language/lv_LV/plugin.lang.php
===================================================================
--- extensions/AddInfo/language/lv_LV/plugin.lang.php	(revision 21629)
+++ extensions/AddInfo/language/lv_LV/plugin.lang.php	(revision 21631)
@@ -20,5 +20,5 @@
 $lang['addinfo_info2'] = 'INFO2';
 $lang['addinfo_info3'] = 'INFO3';
-
+$lang['Add information before'] = 'Pievienojiet informāciju pirms';
 
 ?>
Index: extensions/AddInfo/language/nb_NO/plugin.lang.php
===================================================================
--- extensions/AddInfo/language/nb_NO/plugin.lang.php	(revision 21629)
+++ extensions/AddInfo/language/nb_NO/plugin.lang.php	(revision 21631)
@@ -1,10 +1,6 @@
 <?php
-//ADMIN
 $lang['addinfo_h2'] = 'Behandling av tilleggsinformasjon på bilde side';
-
 $lang['addinfo_complete'] = 'Tilleggsinformasjon - Pluggin Legg til Info';
 $lang['addinfo_insing'] = 'sett tinn vardiene i databasen';
-
-//onglet explication
 $lang['addinfo_explication'] = 'Presentasjon';
 $lang['addinfo_explication_help'] = 'Denne plugginen er et eksempel på hvordan man legger til ekstra informasjon på bilder, For å kunne bruke det, bør du tilpasse den';
@@ -13,12 +9,8 @@
 $lang[\'addinfo_info1\'] = \'navn du vil ha for infos1\'; <br>
 $lang[\'addinfo_info2\'] = \'navn du vil ha for infos2\'; <br>
-$lang[\'addinfo_info3\'] = \'navn du vil ha for infos3\'; <br>
-';
-
-//onglet addinfo et admin info
+$lang[\'addinfo_info3\'] = \'navn du vil ha for infos3\'; <br>';
 $lang['addinfo_info1'] = 'INFO1';
 $lang['addinfo_info2'] = 'INFO2';
 $lang['addinfo_info3'] = 'INFO3';
-
-
+$lang['Add information before'] = 'Legg til informasjon før';
 ?>
Index: extensions/AddInfo/language/nl_NL/plugin.lang.php
===================================================================
--- extensions/AddInfo/language/nl_NL/plugin.lang.php	(revision 21629)
+++ extensions/AddInfo/language/nl_NL/plugin.lang.php	(revision 21631)
@@ -34,3 +34,4 @@
 $lang['addinfo_info3'] = 'INFO3';
 $lang['addinfo_insing'] = 'Plaats de waarden in de database';
+$lang['Add information before'] = 'Eerst de informatie invoeren';
 ?>
Index: extensions/AddInfo/language/pl_PL/plugin.lang.php
===================================================================
--- extensions/AddInfo/language/pl_PL/plugin.lang.php	(revision 21629)
+++ extensions/AddInfo/language/pl_PL/plugin.lang.php	(revision 21631)
@@ -34,3 +34,4 @@
 $lang['addinfo_info3'] = 'INFO3';
 $lang['addinfo_insing'] = 'dodaj wartości do bazy danych';
+$lang['Add information before'] = 'Dodaj informację przed';
 ?>
Index: extensions/AddInfo/language/pt_PT/plugin.lang.php
===================================================================
--- extensions/AddInfo/language/pt_PT/plugin.lang.php	(revision 21629)
+++ extensions/AddInfo/language/pt_PT/plugin.lang.php	(revision 21631)
@@ -34,3 +34,4 @@
 $lang['addinfo_info3'] = 'INFO3';
 $lang['addinfo_insing'] = 'Inscrever os valores na base';
+$lang['Add information before'] = 'Adicionar informação antes';
 ?>
Index: extensions/AddInfo/language/ru_RU/plugin.lang.php
===================================================================
--- extensions/AddInfo/language/ru_RU/plugin.lang.php	(revision 21629)
+++ extensions/AddInfo/language/ru_RU/plugin.lang.php	(revision 21631)
@@ -34,3 +34,4 @@
 $lang['addinfo_info3'] = 'INFO3';
 $lang['addinfo_insing'] = 'вставить значения в базу данных';
+$lang['Add information before'] = 'Сначала добавьте информацию';
 ?>
Index: extensions/AddInfo/language/sk_SK/plugin.lang.php
===================================================================
--- extensions/AddInfo/language/sk_SK/plugin.lang.php	(revision 21629)
+++ extensions/AddInfo/language/sk_SK/plugin.lang.php	(revision 21631)
@@ -1,10 +1,6 @@
 <?php
-//ADMIN
 $lang['addinfo_h2'] = 'Riadenie ďalšej informácie na stránke fotografií';
-
 $lang['addinfo_complete'] = 'Ďalšia informácia - Doplnok Pridanie informácie';
 $lang['addinfo_insing'] = 'vloženie hodnoty do databázy';
-
-//onglet explication
 $lang['addinfo_explication'] = 'Prezentácia';
 $lang['addinfo_explication_help'] = 'Tento doplnok je príklad pridávania informácií do fotografií, jeho použitie môžete prispôsobovať';
@@ -13,12 +9,9 @@
 $lang[\'addinfo_info1\'] = \'názov, ktorý chcete pre infos1\'; <br>
 $lang[\'addinfo_info2\'] = \'názov, ktorý chcete pre infos2\'; <br>
-$lang[\'addinfo_info3\'] = \'názov, ktorý chcete pre infos3\'; <br>
-';
-
-//onglet addinfo et admin info
+$lang[\'addinfo_info3\'] = \'názov, ktorý chcete pre infos3\'; <br>';
 $lang['addinfo_info1'] = 'INFO1';
 $lang['addinfo_info2'] = 'INFO2';
 $lang['addinfo_info3'] = 'INFO3';
-
+$lang['Add information before'] = 'Pridať informáciu pred';
 
 ?>
Index: extensions/AddInfo/language/tr_TR/plugin.lang.php
===================================================================
--- extensions/AddInfo/language/tr_TR/plugin.lang.php	(revision 21629)
+++ extensions/AddInfo/language/tr_TR/plugin.lang.php	(revision 21631)
@@ -34,3 +34,4 @@
 $lang['addinfo_info3'] = 'BİLGİ3';
 $lang['addinfo_insing'] = 'Veri tabanındaki değerleri ekle';
+$lang['Add information before'] = 'Önce bilgi ekleyiniz';
 ?>
Index: extensions/AddInfo/language/uk_UA/plugin.lang.php
===================================================================
--- extensions/AddInfo/language/uk_UA/plugin.lang.php	(revision 21629)
+++ extensions/AddInfo/language/uk_UA/plugin.lang.php	(revision 21631)
@@ -34,3 +34,4 @@
 $lang['addinfo_info3'] = 'INFO3';
 $lang['addinfo_insing'] = 'вставити значення в базу даних';
+$lang['Add information before'] = 'Додати інформацію до';
 ?>
Index: extensions/AddInfo/language/zh_CN/plugin.lang.php
===================================================================
--- extensions/AddInfo/language/zh_CN/plugin.lang.php	(revision 21629)
+++ extensions/AddInfo/language/zh_CN/plugin.lang.php	(revision 21631)
@@ -34,3 +34,4 @@
 $lang['addinfo_explication_help'] = '这个插件是一个给图片增加备注信息的例子，你使用它，你得适应它。';
 $lang['addinfo_explication'] = '介绍';
+$lang['Add information before'] = '添加信息(在之前)';
 ?>
Index: extensions/AddInfo/maintain.inc.php
===================================================================
--- extensions/AddInfo/maintain.inc.php	(revision 21629)
+++ extensions/AddInfo/maintain.inc.php	(revision 21631)
@@ -15,5 +15,18 @@
 PRIMARY KEY (id))DEFAULT CHARSET=utf8;";
 	$result = pwg_query($query);
+	
+	$query = 'INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment) VALUES ("AddInfo","datecreate","AddInfo");';
+    pwg_query($query);
 
+}
+
+function plugin_activate()
+{
+  global $conf;
+  if (empty($conf['AddInfo']))
+  {
+  	$query = 'INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment) VALUES ("AddInfo","datecreate","AddInfo");';
+    pwg_query($query);
+  }
 }
 
@@ -24,4 +37,7 @@
 	$q = 'DROP TABLE ' . $prefixeTable . 'AddInfo_images;';
     pwg_query($q);
+	
+	$q = 'DELETE FROM ' . CONFIG_TABLE . ' WHERE param="AddInfo" LIMIT 1;';
+    pwg_query($q);
 }
 
