Index: extensions/nbc_HistoryIPExcluder/trunk/admin/HIPE_admin.php
===================================================================
--- extensions/nbc_HistoryIPExcluder/trunk/admin/HIPE_admin.php	(revision 5162)
+++ extensions/nbc_HistoryIPExcluder/trunk/admin/HIPE_admin.php	(revision 5615)
@@ -4,4 +4,11 @@
 
 load_language('plugin.lang', HIPE_PATH);
+
+// +-----------------------------------------------------------------------+
+// |                      Getting plugin version                           |
+// +-----------------------------------------------------------------------+
+$plugin =  HIPE_infos(HIPE_PATH);
+$version = $plugin['version'];
+$name = $plugin['name'];
 
 
@@ -76,5 +83,5 @@
   $subresult = pwg_query($query);
 
-  while ($subrow = mysql_fetch_array($subresult))
+  while ($subrow = pwg_db_fetch_assoc($subresult))
   {
     $template->assign(
@@ -116,5 +123,5 @@
   $subresult = pwg_query($query);
 
-  while ($subrow = mysql_fetch_array($subresult))
+  while ($subrow = pwg_db_fetch_assoc($subresult))
   {
     $template->assign(
@@ -149,5 +156,5 @@
   $subresult = pwg_query($query);
 
-  while ($subrow = mysql_fetch_array($subresult))
+  while ($subrow = pwg_db_fetch_assoc($subresult))
   {
     $template->assign(
@@ -182,5 +189,5 @@
   $subresult = pwg_query($query);
 
-  while ($subrow = mysql_fetch_array($subresult))
+  while ($subrow = pwg_db_fetch_assoc($subresult))
   {
     $template->assign(
@@ -201,5 +208,7 @@
 $template->assign(
   array(
-    'HIPE_F_ACTION' => PHPWG_ROOT_PATH.'admin.php?page=plugin&section=HistoryIPExcluder%2Fadmin%2FHIPE_admin.php',
+    'HIPE_VERSION' => $version,
+    'HIPE_NAME'    => $name,
+    'HIPE_PATH'    => HIPE_PATH,
     'IPs_EXCLUDED' => implode("\n", $conf_HIPE),
   )
Index: extensions/nbc_HistoryIPExcluder/trunk/admin/HIPE_admin.tpl
===================================================================
--- extensions/nbc_HistoryIPExcluder/trunk/admin/HIPE_admin.tpl	(revision 5162)
+++ extensions/nbc_HistoryIPExcluder/trunk/admin/HIPE_admin.tpl	(revision 5615)
@@ -1,9 +1,9 @@
 <div class="titrePage">
-  <h2>{'HIPE_admin_title'|@translate}</h2>
+  <h2>{$HIPE_NAME}{'HIPE_version'|@translate}{$HIPE_VERSION}</h2>
 </div>
 
 <p>{'HIPE_description'|@translate}</p>
 
-<form method="post" action="{$HIPE_F_ACTION}" class="general">
+<form method="post" action="" class="general">
   <fieldset>
     <legend>{'HIPE_admin_section1'|@translate}</legend>
Index: extensions/nbc_HistoryIPExcluder/trunk/include/functions.inc.php
===================================================================
--- extensions/nbc_HistoryIPExcluder/trunk/include/functions.inc.php	(revision 5615)
+++ extensions/nbc_HistoryIPExcluder/trunk/include/functions.inc.php	(revision 5615)
@@ -0,0 +1,48 @@
+<?php
+
+load_language('plugin.lang', HIPE_PATH);
+
+function HIPE_infos($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/language/en_UK/plugin.lang.php
===================================================================
--- extensions/nbc_HistoryIPExcluder/trunk/language/en_UK/plugin.lang.php	(revision 5162)
+++ extensions/nbc_HistoryIPExcluder/trunk/language/en_UK/plugin.lang.php	(revision 5615)
@@ -2,5 +2,4 @@
 global $lang;
 
-$lang['HIPE_admin_title'] = 'NBC History IP Excluder';
 $lang['HIPE_description'] = 'This plugin allows to exclude from the history and statistics of IP or IP ranges. <br>Its activation blocks record in the table of IP *_history specified in the table below.';
 $lang['HIPE_admin_section1'] = 'IP Exclusion';
@@ -27,3 +26,7 @@
 
 $lang['IP_geolocalisation'] = 'Geolocalisation';
+
+// --------- Starting below: New or revised $lang ---- from version 2.1.0
+$lang['HIPE_version'] = ' - Version: ';
+// --------- End: New or revised $lang ---- from version 2.1.0
 ?>
Index: extensions/nbc_HistoryIPExcluder/trunk/language/es_ES/plugin.lang.php
===================================================================
--- extensions/nbc_HistoryIPExcluder/trunk/language/es_ES/plugin.lang.php	(revision 5162)
+++ extensions/nbc_HistoryIPExcluder/trunk/language/es_ES/plugin.lang.php	(revision 5615)
@@ -2,5 +2,4 @@
 global $lang;
 
-$lang['HIPE_admin_title'] = 'NBC History IP Excluder';
 $lang['HIPE_description'] = 'Este plugin permite excluir de la reseña histórica y las estadísticas del IP o las playas d \'IP. <br> Su activación bloquea el registro en la mesa * _history IP especificados en el tablero más abajo.';
 $lang['HIPE_admin_section1'] = 'IP a excluir';
@@ -28,3 +27,7 @@
 $lang['IP_geolocalisation'] = 'Geolocalización';
 $lang['submit'] = 'Someter';
+
+// --------- Starting below: New or revised $lang ---- from version 2.1.0
+$lang['HIPE_version'] = ' - Versión: ';
+// --------- End: New or revised $lang ---- from version 2.1.0
 ?>
Index: extensions/nbc_HistoryIPExcluder/trunk/language/fr_FR/plugin.lang.php
===================================================================
--- extensions/nbc_HistoryIPExcluder/trunk/language/fr_FR/plugin.lang.php	(revision 5162)
+++ extensions/nbc_HistoryIPExcluder/trunk/language/fr_FR/plugin.lang.php	(revision 5615)
@@ -2,5 +2,4 @@
 global $lang;
 
-$lang['HIPE_admin_title'] = 'NBC History IP Excluder';
 $lang['HIPE_description'] = 'Ce plugin permet d\'exclure de l\'historique et des statistiques des IP ou plages d\'IP.<br>Son activation bloque l\'enregistrement dans la table *_history des IP spécifiées dans le tableau ci-dessous.';
 $lang['HIPE_admin_section1'] = 'IP à exclure';
@@ -27,3 +26,7 @@
 
 $lang['IP_geolocalisation'] = 'Géolocalisation';
+
+// --------- Starting below: New or revised $lang ---- from version 2.1.0
+$lang['HIPE_version'] = ' - Version: ';
+// --------- End: New or revised $lang ---- from version 2.1.0
 ?>
Index: extensions/nbc_HistoryIPExcluder/trunk/language/hu_HU/plugin.lang.php
===================================================================
--- extensions/nbc_HistoryIPExcluder/trunk/language/hu_HU/plugin.lang.php	(revision 5162)
+++ extensions/nbc_HistoryIPExcluder/trunk/language/hu_HU/plugin.lang.php	(revision 5615)
@@ -2,5 +2,4 @@
 global $lang;
 
-$lang['HIPE_admin_title'] = 'NBC History IP Excluder';
 $lang['HIPE_description'] = 'Ezzel a bővítménnyel kizárhat IP címeket, vagy IP tartományokat az előzményekből és a statisztikából. <br>A blokkolt rekordokat az IP *_history táblában az alábbi táblázat tartalmazza.';
 $lang['HIPE_admin_section1'] = 'IP-k kizárása';
@@ -27,3 +26,7 @@
 
 $lang['IP_geolocalisation'] = 'Földrajzi hely';
+
+// --------- Starting below: New or revised $lang ---- from version 2.1.0
+$lang['HIPE_version'] = ' - Változat: ';
+// --------- End: New or revised $lang ---- from version 2.1.0
 ?>
Index: extensions/nbc_HistoryIPExcluder/trunk/language/it_IT/plugin.lang.php
===================================================================
--- extensions/nbc_HistoryIPExcluder/trunk/language/it_IT/plugin.lang.php	(revision 5162)
+++ extensions/nbc_HistoryIPExcluder/trunk/language/it_IT/plugin.lang.php	(revision 5615)
@@ -2,5 +2,4 @@
 global $lang;
 
-$lang['HIPE_admin_title'] = 'NBC History IP Excluder';
 $lang['HIPE_description'] = 'Questo plugin esclude gli indirizzi IP o intervalli d\indieizzi dalla cronologgia e dalle statistiche.<br>Attivandolo, gli indirizzi IP specifici della tabella sottostante non saranno più registrati nella tabella *.history de PWG.';
 $lang['HIPE_admin_section1'] = 'Esclusione d\'IP';
@@ -27,3 +26,7 @@
 
 $lang['IP_geolocalisation'] = 'Geolocalizzazione';
+
+// --------- Starting below: New or revised $lang ---- from version 2.1.0
+$lang['HIPE_version'] = ' - Versione: ';
+// --------- End: New or revised $lang ---- from version 2.1.0
 ?>
Index: extensions/nbc_HistoryIPExcluder/trunk/main.inc.php
===================================================================
--- extensions/nbc_HistoryIPExcluder/trunk/main.inc.php	(revision 5162)
+++ extensions/nbc_HistoryIPExcluder/trunk/main.inc.php	(revision 5615)
@@ -2,5 +2,5 @@
 /*
 Plugin Name: History IP Excluder
-Version: 2.0.1
+Version: 2.1.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 URI: http://phpwebgallery.net/ext/extension_view.php?eid=147
@@ -9,8 +9,25 @@
 */
 
+/*
+:: HISTORY
+
+1.0.x to 1.6.x		- Plugin only for PWG 1.7.x
+
+2.0.0             - Compliance with Piwigo 2.0.x
+
+2.1.0             - Compliance with Piwigo 2.1.x
+                  - Multiple database support
+                  - Removing "nbc_" prefix in plugin code and display in piwigo's plugin manager
+                  - Displaying the good plugin name and current version in admin panel
+
+--------------------------------------------------------------------------------
+*/
+
 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
 
 if (!defined('HIPE_DIR')) define('HIPE_DIR' , basename(dirname(__FILE__)));
 if (!defined('HIPE_PATH')) define('HIPE_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/');
+
+include_once (HIPE_PATH.'/include/functions.inc.php');
 
 load_language('plugin.lang', HIPE_PATH);
@@ -25,5 +42,5 @@
 // |                      Getting plugin name                              |
 // +-----------------------------------------------------------------------+
-  $plugin =  PluginNfo(HIPE_PATH);
+  $plugin =  HIPE_infos(HIPE_PATH);
   $name = $plugin['name'];
   
@@ -69,60 +86,3 @@
   }
 }
-
-
-/* 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 5162)
+++ extensions/nbc_HistoryIPExcluder/trunk/maintain.inc.php	(revision 5615)
@@ -27,5 +27,5 @@
 WHERE param = "nbc_HistoryIPExcluder"
 ;';
-  $count = mysql_num_rows(pwg_query($query));
+  $count = pwg_db_num_rows(pwg_query($query));
   
 	if ($count == 1)
