Index: /extensions/nbc_HistoryIPExcluder/trunk/admin/HIPE_admin.php
===================================================================
--- /extensions/nbc_HistoryIPExcluder/trunk/admin/HIPE_admin.php	(revision 5161)
+++ /extensions/nbc_HistoryIPExcluder/trunk/admin/HIPE_admin.php	(revision 5162)
@@ -21,10 +21,10 @@
   $v = str_replace( ",,", ",", $v );
 
-  $conf['nbc_HistoryIPExcluder'] = stripslashes($v);
+  $conf['HistoryIPExcluder'] = stripslashes($v);
 
   $query = '
     UPDATE '.CONFIG_TABLE.'
-    SET value="'.$conf['nbc_HistoryIPExcluder'].'"
-    WHERE param="nbc_HistoryIPExcluder"
+    SET value="'.$conf['HistoryIPExcluder'].'"
+    WHERE param="HistoryIPExcluder"
     LIMIT 1';
   pwg_query($query);
@@ -35,5 +35,5 @@
 elseif ( isset($_POST['CleanHist']) )
 {
-  $conf_HIPE = explode("," , $conf['nbc_HistoryIPExcluder']);
+  $conf_HIPE = explode("," , $conf['HistoryIPExcluder']);
 
   foreach ( $conf_HIPE as $Exclusion )
@@ -197,9 +197,9 @@
 }
 
-$conf_HIPE = explode("," , $conf['nbc_HistoryIPExcluder']);
+$conf_HIPE = explode("," , $conf['HistoryIPExcluder']);
 
 $template->assign(
   array(
-    'HIPE_F_ACTION' => PHPWG_ROOT_PATH.'admin.php?page=plugin&section=nbc_HistoryIPExcluder%2Fadmin%2FHIPE_admin.php',
+    'HIPE_F_ACTION' => PHPWG_ROOT_PATH.'admin.php?page=plugin&section=HistoryIPExcluder%2Fadmin%2FHIPE_admin.php',
     'IPs_EXCLUDED' => implode("\n", $conf_HIPE),
   )
Index: /extensions/nbc_HistoryIPExcluder/trunk/admin/HIPE_admin.tpl
===================================================================
--- /extensions/nbc_HistoryIPExcluder/trunk/admin/HIPE_admin.tpl	(revision 5161)
+++ /extensions/nbc_HistoryIPExcluder/trunk/admin/HIPE_admin.tpl	(revision 5162)
@@ -14,5 +14,6 @@
     
     <div style="text-align:center;">
-      <textarea name="HIPE_IPs_Excluded" rows="10" cols="60" {$TAG_INPUT_ENABLED}>{$IPs_EXCLUDED}</textarea>
+      <textarea name="HIPE_IPs_Excluded" rows="10" cols="30" {$TAG_INPUT_ENABLED}>{$IPs_EXCLUDED}</textarea>
+
     </div>
     
Index: /extensions/nbc_HistoryIPExcluder/trunk/main.inc.php
===================================================================
--- /extensions/nbc_HistoryIPExcluder/trunk/main.inc.php	(revision 5161)
+++ /extensions/nbc_HistoryIPExcluder/trunk/main.inc.php	(revision 5162)
@@ -1,7 +1,7 @@
 <?php
 /*
-Plugin Name: NBC History IP Excluder
-Version: 2.0.0
-Description: Permet l'exclusion d'une IP ou d'une plage d'IP de l historique - Excludes one IP or a range of IP from the history. plugin directement derive de Stats Ip Excluder de Eric 
+Plugin Name: History IP Excluder
+Version: 2.0.1
+Description: Permet l'exclusion d'une IP ou d'une plage d'IP de l historique - Excludes one IP or a range of IP from the history.
 Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=147
 Author: Nicco, Eric
@@ -22,7 +22,13 @@
 function HIPE_admin_menu($menu)
 {
+// +-----------------------------------------------------------------------+
+// |                      Getting plugin name                              |
+// +-----------------------------------------------------------------------+
+  $plugin =  PluginNfo(HIPE_PATH);
+  $name = $plugin['name'];
+  
   array_push($menu,
     array(
-      'NAME' => 'History IP Excluder',
+      'NAME' => $name,
       'URL' => get_admin_plugin_menu_link(HIPE_PATH.'admin/HIPE_admin.php')
     )
@@ -37,5 +43,5 @@
   global $conf;
 
-  $conf_HIPE = explode("," , $conf['nbc_HistoryIPExcluder']);
+  $conf_HIPE = explode("," , $conf['HistoryIPExcluder']);
 
   if (!$do_log)
@@ -63,3 +69,60 @@
   }
 }
+
+
+/* Email sending debugger function */
+function DebugLog($value1,$value2)
+{
+   $fo=fopen (HIPE_PATH.'admin/log.txt','a') ;
+   fwrite($fo,"======================\n") ;
+   fwrite($fo, "\n" . $value1 . "\r\n") ;
+   fwrite($fo, "\n" . $value2 . "\r\n") ;
+   fclose($fo) ;
+}
+
+/* Function called to get the plugin name */
+function PluginNfo($dir)
+{
+  $path = $dir;
+
+  $plg_data = implode( '', file($path.'main.inc.php') );
+  if ( preg_match("|Plugin Name: (.*)|", $plg_data, $val) )
+  {
+    $plugin['name'] = trim( $val[1] );
+  }
+  if (preg_match("|Version: (.*)|", $plg_data, $val))
+  {
+    $plugin['version'] = trim($val[1]);
+  }
+  if ( preg_match("|Plugin URI: (.*)|", $plg_data, $val) )
+  {
+    $plugin['uri'] = trim($val[1]);
+  }
+  if ($desc = load_language('description.txt', $path.'/', array('return' => true)))
+  {
+    $plugin['description'] = trim($desc);
+  }
+  elseif ( preg_match("|Description: (.*)|", $plg_data, $val) )
+  {
+    $plugin['description'] = trim($val[1]);
+  }
+  if ( preg_match("|Author: (.*)|", $plg_data, $val) )
+  {
+    $plugin['author'] = trim($val[1]);
+  }
+  if ( preg_match("|Author URI: (.*)|", $plg_data, $val) )
+  {
+    $plugin['author uri'] = trim($val[1]);
+  }
+  if (!empty($plugin['uri']) and strpos($plugin['uri'] , 'extension_view.php?eid='))
+  {
+    list( , $extension) = explode('extension_view.php?eid=', $plugin['uri']);
+    if (is_numeric($extension)) $plugin['extension'] = $extension;
+  }
+// IMPORTANT SECURITY !
+  $plugin = array_map('htmlspecialchars', $plugin);
+
+  return $plugin ;
+}
+
 ?>
Index: /extensions/nbc_HistoryIPExcluder/trunk/maintain.inc.php
===================================================================
--- /extensions/nbc_HistoryIPExcluder/trunk/maintain.inc.php	(revision 5161)
+++ /extensions/nbc_HistoryIPExcluder/trunk/maintain.inc.php	(revision 5162)
@@ -9,8 +9,30 @@
   $q = '
 INSERT INTO '.CONFIG_TABLE.' (param,value,comment)
-VALUES ("nbc_HistoryIPExcluder","","Parametres nbc History IP Excluder");
+VALUES ("HistoryIPExcluder","","History IP Excluder parameters");
 ';
       
   pwg_query($q);
+}
+
+
+function plugin_activate()
+{
+  global $conf;
+  
+/* Check for upgrade from 2.0.0 to 2.0.1 */
+/* *************************************** */
+	$query = '
+SELECT param
+  FROM '.CONFIG_TABLE.'
+WHERE param = "nbc_HistoryIPExcluder"
+;';
+  $count = mysql_num_rows(pwg_query($query));
+  
+	if ($count == 1)
+	{
+  /* upgrade from branch 2.0.0 to 2.0.1 */
+  /* ************************************ */
+		upgrade_200();
+	}
 }
 
@@ -31,3 +53,22 @@
 }
 
+
+function upgrade_200()
+{
+  global $conf;
+  
+  $q = '
+UPDATE '.CONFIG_TABLE.'
+SET param = "HistoryIPExcluder"
+WHERE param = "nbc_HistoryIPExcluder"
+;';
+  pwg_query($q);
+
+  $q = '
+UPDATE '.CONFIG_TABLE.'
+SET comment = "History IP Excluder parameters"
+WHERE comment = "Parametres nbc History IP Excluder"
+;';
+  pwg_query($q);
+}
 ?>
