Index: extensions/lmt/admin/plugin_admin.php
===================================================================
--- extensions/lmt/admin/plugin_admin.php	(revision 5431)
+++ extensions/lmt/admin/plugin_admin.php	(revision 5548)
@@ -22,5 +22,5 @@
 $main_plugin_object = get_plugin_data($plugin_id);
 
-$plugin_aip = new LMT_AIP($prefixeTable, $main_plugin_object->get_filelocation());
+$plugin_aip = new LMT_AIP($prefixeTable, $main_plugin_object->getFileLocation());
 $plugin_aip->manage();
 ?>
Index: extensions/lmt/admin/plugin_admin_list.tpl
===================================================================
--- extensions/lmt/admin/plugin_admin_list.tpl	(revision 5431)
+++ extensions/lmt/admin/plugin_admin_list.tpl	(revision 5548)
@@ -3,8 +3,9 @@
   function loadpage(pagenum)
   {
-    http_request=create_httpobject('get', '', '{/literal}{$datas.LMT_AJAX_URL_LIST}{literal}'+pagenum+"&filter="+$("#filter").val(), false);
-    http_request.send(null);
-
-    tmp=http_request.responseText;
+    tmp=$.ajax({
+      type: "POST",
+      url: "{/literal}{$datas.LMT_AJAX_URL_LIST}{literal}"+pagenum+"&filter="+$("#filter").val(),
+      async: false,
+     }).responseText;
 
     $("#nbphotos").attr("innerHTML", tmp.substr(0,tmp.indexOf("#")));
Index: extensions/lmt/admin/plugin_admin_manage.tpl
===================================================================
--- extensions/lmt/admin/plugin_admin_manage.tpl	(revision 5431)
+++ extensions/lmt/admin/plugin_admin_manage.tpl	(revision 5548)
@@ -10,9 +10,10 @@
   function loadpage(pagenum)
   {
-    http_request=create_httpobject('get', '', '{/literal}{$datas.LMT_AJAX_URL_LIST}{literal}'+pagenum, false);
-    http_request.send(null);
+    tmp=$.ajax({
+      type: "POST",
+      url: "{/literal}{$datas.LMT_AJAX_URL_LIST}{literal}"+pagenum,
+      async: false,
+     }).responseText;
 
-    tmp=http_request.responseText;
-    
     $("#nbphotos").attr("innerHTML", tmp.substr(0,tmp.indexOf("#")));
     $("#list").attr("innerHTML", tmp.substr(tmp.indexOf("#")+1));
@@ -32,5 +33,5 @@
       $("#img"+id).attr("className", "is_on");
       $(document).data("nbsel", $(document).data("nbsel")+1);
-    }    
+    }
     $("#btsubmit").get(0).disabled=($(document).data("nbsel")==0);
   }
@@ -43,28 +44,28 @@
       case '-':
         break;
-      case 'all': 
+      case 'all':
         $(document).data("nbsel", {/literal}{$nbphotos}{literal});
         $("input").filter(".none").each(
-          function(i) 
-          { 
-            this.value="1"; 
+          function(i)
+          {
+            this.value="1";
             $("#img"+this.id).attr("className", "is_on");
-          } 
-        );        
+          }
+        );
         break;
       case 'none':
         $(document).data("nbsel", 0);
         $("input").filter(".none").each(
-          function(i) 
-          { 
-            this.value="0"; 
+          function(i)
+          {
+            this.value="0";
             $("#img"+this.id).attr("className", "is_off");
-          } 
-        );        
+          }
+        );
         break;
       case 'invert':
         $("input").filter(".none").each(
-          function(i) 
-          { 
+          function(i)
+          {
             if(this.value=="1")
             {
@@ -79,12 +80,12 @@
               $(document).data("nbsel", $(document).data("nbsel")+1);
             }
-          } 
-        );        
+          }
+        );
         break;
       default:
         $(document).data("nbsel", 0);
         $("input").filter(".none").each(
-          function(i) 
-          { 
+          function(i)
+          {
             if(this.alt==act)
             {
@@ -93,8 +94,8 @@
               $(document).data("nbsel", $(document).data("nbsel")+1);
             }
-          } 
-        );        
+          }
+        );
         break;
-    } 
+    }
     $("#selectlist").get(0).options[0].selected=true;
     $("#btsubmit").get(0).disabled=($(document).data("nbsel")==0);
Index: extensions/lmt/language/fr_FR/plugin.lang.php
===================================================================
--- extensions/lmt/language/fr_FR/plugin.lang.php	(revision 5431)
+++ extensions/lmt/language/fr_FR/plugin.lang.php	(revision 5548)
@@ -180,6 +180,8 @@
 //1.1.0
 $lang["lmt_help_config"][10] = "Si activé, l'ouverture de la page vers laquelle pointe l'hyperlien sera effectuée dans une nouvelle fenêtre.";
-$lang["lmt_cfg_warning_target"] = "Forcer l'ouverture dans une nouvelle fenêtre"
+$lang["lmt_cfg_warning_target"] = "Forcer l'ouverture dans une nouvelle fenêtre";
 
+// 1.2.0
+$lang['To install this plugin, you need to install Grum Plugin Classes %s before'] = 'Pour installer ce plugin, vous devez au préalable, installer le plugin Grum Plugin Classes %s';
 
 
Index: extensions/lmt/lmt_aim.class.inc.php
===================================================================
--- extensions/lmt/lmt_aim.class.inc.php	(revision 5431)
+++ extensions/lmt/lmt_aim.class.inc.php	(revision 5548)
@@ -19,6 +19,6 @@
 
 class LMT_AIM extends LMT_root
-{ 
-  public function LMT_AIM($prefixeTable, $filelocation)
+{
+  public function __construct($prefixeTable, $filelocation)
   {
     parent::__construct($prefixeTable, $filelocation);
@@ -28,8 +28,8 @@
     initialize events call for the plugin
   */
-  public function init_events()
+  public function initEvents()
   {
-    parent::init_events();
-    add_event_handler('get_admin_plugin_menu_links', array(&$this, 'plugin_admin_menu') );
+    parent::initEvents();
+    add_event_handler('get_admin_plugin_menu_links', array(&$this, 'pluginAdminMenu') );
   }
 
Index: extensions/lmt/lmt_aip.class.inc.php
===================================================================
--- extensions/lmt/lmt_aip.class.inc.php	(revision 5431)
+++ extensions/lmt/lmt_aip.class.inc.php	(revision 5548)
@@ -15,8 +15,8 @@
 
 include_once('lmt_root.class.inc.php');
-include_once(PHPWG_PLUGINS_PATH.'grum_plugins_classes-2/translate.class.inc.php');
-include_once(PHPWG_PLUGINS_PATH.'grum_plugins_classes-2/tables.class.inc.php');
-include_once(PHPWG_PLUGINS_PATH.'grum_plugins_classes-2/genericjs.class.inc.php');
-include_once(PHPWG_PLUGINS_PATH.'grum_plugins_classes-2/pages_navigation.class.inc.php');
+include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/GPCTranslate.class.inc.php');
+include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/GPCTables.class.inc.php');
+include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/genericjs.class.inc.php');
+include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/GPCPagesNavigation.class.inc.php');
 include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
 
@@ -26,30 +26,27 @@
   protected $tabsheet;
 
-  public function LMT_AIP($prefixeTable, $filelocation)
+  public function __construct($prefixeTable, $filelocation)
   {
     parent::__construct($prefixeTable, $filelocation);
-    $this->load_config();
-    $this->init_events();
+    $this->loadConfig();
+    $this->initEvents();
 
     $this->tabsheet = new tabsheet();
     $this->tabsheet->add('list',
                           l10n('lmt_list'),
-                          $this->page_link."&amp;f_tabsheet=list");
+                          $this->getAdminLink()."&amp;f_tabsheet=list");
     $this->tabsheet->add('manage',
                           l10n('lmt_manage'),
-                          $this->page_link."&amp;f_tabsheet=manage");
+                          $this->getAdminLink()."&amp;f_tabsheet=manage");
     $this->tabsheet->add('manageaut',
                           l10n('lmt_manageaut'),
-                          $this->page_link."&amp;f_tabsheet=manageaut");
+                          $this->getAdminLink()."&amp;f_tabsheet=manageaut");
     $this->tabsheet->add('config',
                           l10n('lmt_config'),
-                          $this->page_link."&amp;f_tabsheet=config");
+                          $this->getAdminLink()."&amp;f_tabsheet=config");
     $this->tabsheet->add('help',
                           l10n('lmt_help'),
-                          $this->page_link."&amp;f_tabsheet=help");
-
-    // don't create this object inside root classe otherwise header is modified
-    // everywhere in admin pages
-    $this->ajax = new Ajax();
+                          $this->getAdminLink()."&amp;f_tabsheet=help");
+
 
     // don't create the google_translate object everytime, otherwise google's js
@@ -59,7 +56,14 @@
     /*if((isset($_POST['fmypolls_gomodify_translation'])||isset($_POST['fmypolls_goadd_translation'])))
     {
-      $this->google_translate = new translate();
+      $this->google_translate = new GPCTranslate();
     }
     */
+  }
+
+  public function __destruct()
+  {
+    unset($this->google_translate);
+    unset($this->tabsheet);
+    parent::__destruct();
   }
 
@@ -67,9 +71,9 @@
     initialize events call for the plugin
   */
-  public function init_events()
-  {
-    parent::init_events();
-    add_event_handler('loc_end_page_header', array(&$this->css, 'apply_CSS'));
-    add_event_handler('loc_end_page_header', array(&$this->css_icn, 'apply_CSS'));
+  public function initEvents()
+  {
+    parent::initEvents();
+    add_event_handler('loc_end_page_header', array(&$this->css, 'applyCSS'));
+    add_event_handler('loc_end_page_header', array(&$this->css_icn, 'applyCSS'));
   }
 
@@ -117,5 +121,5 @@
     $template->assign($this->tabsheet->get_titlename(), "[".$selected_tab['caption']."]");
 
-    $template_plugin["LMT_VERSION"] = "<i>".$this->plugin_name."</i> ".l10n('lmt_release').LMT_VERSION;
+    $template_plugin["LMT_VERSION"] = "<i>".$this->getPluginName()."</i> ".l10n('lmt_release').LMT_VERSION;
     $template_plugin["LMT_PAGE"] = $_REQUEST['f_tabsheet'];
     $template_plugin["LMT_TITLE"] = "";
@@ -146,6 +150,5 @@
           break;
       }
-      //$template->
-      $this->ajax->return_result($result);
+      GPCAjax::returnResult($result);
     }
   }
@@ -163,5 +166,5 @@
       if(isset($_POST['submit_save_config']))
       {
-        foreach($this->my_config as $key => $val)
+        foreach($this->config as $key => $val)
         {
           if(is_array($val))
@@ -171,5 +174,5 @@
               if(isset($_REQUEST[str2url('f_'.$key.'_'.$key2)]))
               {
-                $this->my_config[$key][$key2] = htmlspecialchars(stripslashes($_REQUEST[str2url('f_'.$key.'_'.$key2)]), ENT_QUOTES);
+                $this->config[$key][$key2] = htmlspecialchars(stripslashes($_REQUEST[str2url('f_'.$key.'_'.$key2)]), ENT_QUOTES);
               }
             }
@@ -179,10 +182,10 @@
             if(isset($_REQUEST['f_'.$key]))
             {
-              $this->my_config[$key] = $_REQUEST['f_'.$key];
+              $this->config[$key] = $_REQUEST['f_'.$key];
             }
           }
 
         }
-        $this->display_result(l10n('lmt_save_config'), $this->save_config());
+        $this->displayResult(l10n('lmt_save_config'), $this->saveConfig());
       }
     }
@@ -199,5 +202,5 @@
 
     $template->set_filename('body_page',
-                dirname($this->filelocation).'/admin/plugin_admin_help.tpl');
+                dirname($this->getFileLocation()).'/admin/plugin_admin_help.tpl');
 
     $template->assign('imgdir', LMT_PATH."img/");
@@ -213,5 +216,5 @@
 
     $template->set_filename('body_page',
-                dirname($this->filelocation).'/admin/plugin_admin_list.tpl');
+                dirname($this->getFileLocation()).'/admin/plugin_admin_list.tpl');
 
     if(!isset($_REQUEST['filter']) ||
@@ -230,5 +233,5 @@
 
     $datas=array(
-      "LMT_AJAX_URL_LIST" =>  $this->page_link.'&ajaxfct=img_list&numpage='
+      "LMT_AJAX_URL_LIST" =>  $this->getAdminLink().'&ajaxfct=img_list&numpage='
     );
 
@@ -247,6 +250,6 @@
     $filter_list_values = array_merge(array(''), $filter_list_values);
     $filter_list_labels = array_merge(array(l10n('lmt_nofilter')), $filter_list_labels);
-    $default_licence = l10n("lmt_lbl_cc-".strtolower($this->my_config['lmt_licence_default']));
-    $default_licence_img =LMT_PATH."img/".strtolower($this->my_config['lmt_licence_default'])."_80x15.png";
+    $default_licence = l10n("lmt_lbl_cc-".strtolower($this->config['lmt_licence_default']));
+    $default_licence_img =LMT_PATH."img/".strtolower($this->config['lmt_licence_default'])."_80x15.png";
 
     $results=true;
@@ -272,9 +275,9 @@
       if((!$results)||(!$result))
       {
-        $this->display_result(l10n("lmt_caddie_not_updated"), false);
+        $this->displayResult(l10n("lmt_caddie_not_updated"), false);
       }
       else
       {
-        $this->display_result(l10n("lmt_caddie_updated"), true);
+        $this->displayResult(l10n("lmt_caddie_updated"), true);
       }
     }
@@ -347,15 +350,15 @@
         if($results[0]!="")
         {
-          $this->display_result($results[0], true);
+          $this->displayResult($results[0], true);
         }
 
         if($results[1]!="")
         {
-          $this->display_result($results[1], false);
+          $this->displayResult($results[1], false);
         }
       }
       else
       {
-        $this->display_result(l10n("lmt_no_element_selected"), false);
+        $this->displayResult(l10n("lmt_no_element_selected"), false);
       }
     }
@@ -363,8 +366,8 @@
 
     $template->set_filename('body_page',
-                dirname($this->filelocation).'/admin/plugin_admin_manage.tpl');
+                dirname($this->getFileLocation()).'/admin/plugin_admin_manage.tpl');
 
     $datas=array(
-      "LMT_AJAX_URL_LIST" =>  $this->page_link.'&ajaxfct=manage_list&numpage='
+      "LMT_AJAX_URL_LIST" =>  $this->getAdminLink().'&ajaxfct=manage_list&numpage='
     );
 
@@ -435,5 +438,5 @@
 
     $template->set_filename('body_page',
-                dirname($this->filelocation).'/admin/plugin_admin_config.tpl');
+                dirname($this->getFileLocation()).'/admin/plugin_admin_config.tpl');
 
 
@@ -441,5 +444,5 @@
       "img_directory" => LMT_PATH."img/"
     );
-    foreach($this->my_config as $key => $val)
+    foreach($this->config as $key => $val)
     {
       if(!is_array($val))
@@ -489,5 +492,5 @@
       $datas['lmt_warning_texts'][]=array(
         'lang' => str2url($key),
-        'text' => $this->my_config['lmt_warning_texts'][$key]
+        'text' => $this->config['lmt_warning_texts'][$key]
       );
 
@@ -495,5 +498,5 @@
       {
         $datas['lmt_redirect_urls'][str2url('lmt_redirect_url-'.strToLower($val2))]['langs'][str2url($key)]=
-            $this->my_config['lmt_redirect_url-'.strToLower($val2)][$key];
+            $this->config['lmt_redirect_url-'.strToLower($val2)][$key];
       }
     }
@@ -565,15 +568,15 @@
         if($result)
         {
-          $this->display_result(l10n("lmt_author_added"), true);
+          $this->displayResult(l10n("lmt_author_added"), true);
           $_REQUEST['action']="list";
         }
         else
         {
-          $this->display_result(l10n("lmt_cannot_add_author"), false);
+          $this->displayResult(l10n("lmt_cannot_add_author"), false);
         }
       }
       else
       {
-        $this->display_result(l10n("lmt_no_text"), false);
+        $this->displayResult(l10n("lmt_no_text"), false);
       }
     }
@@ -593,15 +596,15 @@
         if($result)
         {
-          $this->display_result(l10n("lmt_author_modified"), true);
+          $this->displayResult(l10n("lmt_author_modified"), true);
           $_REQUEST['action']="list";
         }
         else
         {
-          $this->display_result(l10n("lmt_cannot_modify_author"), false);
+          $this->displayResult(l10n("lmt_cannot_modify_author"), false);
         }
       }
       else
       {
-        $this->display_result(l10n("lmt_no_text"), false);
+        $this->displayResult(l10n("lmt_no_text"), false);
       }
     }
@@ -618,5 +621,5 @@
         if(pwg_db_changes()==1)
         {
-          $this->display_result(l10n("lmt_author_deleted"), true);
+          $this->displayResult(l10n("lmt_author_deleted"), true);
 
           $sql="UPDATE ".$this->tables["images"]." SET author_id = NULL
@@ -628,20 +631,20 @@
             if($nbimages>0)
             {
-              $this->display_result($nbimages."&nbsp;".l10n("lmt_author_nb_images_updated"), true);
+              $this->displayResult($nbimages."&nbsp;".l10n("lmt_author_nb_images_updated"), true);
             }
           }
           else
           {
-            $this->display_result(l10n("lmt_cannot_delete_author"), false);
+            $this->displayResult(l10n("lmt_cannot_delete_author"), false);
           }
         }
         else
         {
-          $this->display_result(l10n("lmt_cannot_delete_author"), false);
+          $this->displayResult(l10n("lmt_cannot_delete_author"), false);
         }
       }
       else
       {
-        $this->display_result(l10n("lmt_cannot_delete_author"), false);
+        $this->displayResult(l10n("lmt_cannot_delete_author"), false);
       }
       $this->display_manageaut_page_list();
@@ -667,15 +670,15 @@
 
     $template->set_filename('body_page',
-                dirname($this->filelocation).'/admin/plugin_admin_manageaut.tpl');
+                dirname($this->getFileLocation()).'/admin/plugin_admin_manageaut.tpl');
 
     $datas=array(
       "author_list" => array(),
       "img_directory" => LMT_PATH."img/",
-      "default_licencepublished" => l10n("lmt_lbl_under-".strToLower($this->my_config['lmt_licence_default'])),
-      "default_licenceL" => strToLower($this->my_config['lmt_licence_default']),
-      "default_licenceU" => l10n("lmt_lbl_cc_s-".strToLower($this->my_config['lmt_licence_default'])),
-      "lmt_licence_logo" => $this->my_config['lmt_licence_logo'],
+      "default_licencepublished" => l10n("lmt_lbl_under-".strToLower($this->config['lmt_licence_default'])),
+      "default_licenceL" => strToLower($this->config['lmt_licence_default']),
+      "default_licenceU" => l10n("lmt_lbl_cc_s-".strToLower($this->config['lmt_licence_default'])),
+      "lmt_licence_logo" => $this->config['lmt_licence_logo'],
       "nbauthor" => 0,
-      "add_link" => $this->page_link.'&amp;f_tabsheet=manageaut&amp;action=add'
+      "add_link" => $this->getAdminLink().'&amp;f_tabsheet=manageaut&amp;action=add'
     );
 
@@ -690,6 +693,6 @@
           "text1" => $row['text1'],
           "text2" => $row['text2'],
-          "lnk_delete" => $this->page_link.'&amp;f_tabsheet=manageaut&amp;action=delete&amp;id='.$row['id'],
-          "lnk_edit" => $this->page_link.'&amp;f_tabsheet=manageaut&amp;action=edit&amp;id='.$row['id']
+          "lnk_delete" => $this->getAdminLink().'&amp;f_tabsheet=manageaut&amp;action=delete&amp;id='.$row['id'],
+          "lnk_edit" => $this->getAdminLink().'&amp;f_tabsheet=manageaut&amp;action=edit&amp;id='.$row['id']
         );
       }
@@ -707,5 +710,5 @@
 
     $template->set_filename('body_page',
-                dirname($this->filelocation).'/admin/plugin_admin_manageaut_edit.tpl');
+                dirname($this->getFileLocation()).'/admin/plugin_admin_manageaut_edit.tpl');
 
     if($_REQUEST["action"]=="edit")
@@ -745,5 +748,5 @@
     }
 
-    $datas["urllist"] = $this->page_link.'&f_tabsheet=manageaut';
+    $datas["urllist"] = $this->getAdminLink().'&f_tabsheet=manageaut';
 
     $template->assign('datas', $datas);
@@ -761,5 +764,5 @@
     if(is_adviser())
     {
-      $this->display_result(l10n("lmt_adviser_not_allowed"), false);
+      $this->displayResult(l10n("lmt_adviser_not_allowed"), false);
       return(true);
     }
@@ -775,5 +778,5 @@
     $local_tpl = new Template(LMT_PATH."admin/", "");
     $local_tpl->set_filename('body_page',
-                  dirname($this->filelocation).'/admin/lmt_js.tpl');
+                  dirname($this->getFileLocation()).'/admin/lmt_js.tpl');
 
     $lmt_licence_default_values=array_slice($this->licences,0,count($this->licences)-1);
@@ -833,5 +836,5 @@
     $local_tpl = new Template(LMT_PATH."admin/", "");
     $local_tpl->set_filename('body_page',
-                  dirname($this->filelocation).'/admin/plugin_admin_listitems.tpl');
+                  dirname($this->getFileLocation()).'/admin/plugin_admin_listitems.tpl');
 
     if(!isset($_REQUEST['filter']) ||
@@ -870,8 +873,8 @@
     $sql.=" GROUP BY lmti.image_id ORDER BY cat.id, img.id ";
 
-    if($this->my_config['lmt_list_maxitems']>0)
-    {
-      $refdbt = ($pagenum-1)*$this->my_config['lmt_list_maxitems'];
-      $sql.=" LIMIT ".$refdbt.", ".$this->my_config['lmt_list_maxitems'];
+    if($this->config['lmt_list_maxitems']>0)
+    {
+      $refdbt = ($pagenum-1)*$this->config['lmt_list_maxitems'];
+      $sql.=" LIMIT ".$refdbt.", ".$this->config['lmt_list_maxitems'];
     }
 
@@ -921,9 +924,9 @@
     $nb=pwg_db_fetch_row($result);
 
-    $pages_navigation = new pages_navigation();
-    $pages_navigation->set_nb_items($nb[0]);
-    $pages_navigation->set_nb_items_per_page($this->my_config['lmt_list_maxitems']);
-    $pages_navigation->set_current_page($pagenum);
-    $pages_navigation->set_options(array(
+    $GPCPagesNavigation = new GPCPagesNavigation();
+    $GPCPagesNavigation->setNbItems($nb[0]);
+    $GPCPagesNavigation->setNbItemsPerPage($this->config['lmt_list_maxitems']);
+    $GPCPagesNavigation->setCurrentPage($pagenum);
+    $GPCPagesNavigation->setOptions(array(
       "text_prev" => l10n("lmt_nav_prev"),
       "text_next" => l10n("lmt_nav_next"),
@@ -931,5 +934,5 @@
       "text_last" => l10n("lmt_nav_last")
     ));
-    $navbar=$pages_navigation->make_navigation("loadpage");
+    $navbar=$GPCPagesNavigation->makeNavigation("loadpage");
     if($navbar!="")
     {
@@ -947,5 +950,5 @@
     $local_tpl = new Template(LMT_PATH."admin/", "");
     $local_tpl->set_filename('body_page',
-                  dirname($this->filelocation).'/admin/plugin_admin_manageitems.tpl');
+                  dirname($this->getFileLocation()).'/admin/plugin_admin_manageitems.tpl');
 
     if(!isset($_REQUEST['select']))
@@ -972,8 +975,8 @@
           ORDER BY cat.id, img.id ";
 
-    if($this->my_config['lmt_list_maxitems']>0)
-    {
-      $refdbt = ($pagenum-1)*$this->my_config['lmt_list_maxitems'];
-      $sql.=" LIMIT ".$refdbt.", ".$this->my_config['lmt_list_maxitems'];
+    if($this->config['lmt_list_maxitems']>0)
+    {
+      $refdbt = ($pagenum-1)*$this->config['lmt_list_maxitems'];
+      $sql.=" LIMIT ".$refdbt.", ".$this->config['lmt_list_maxitems'];
     }
 
@@ -1023,9 +1026,9 @@
     $nb=pwg_db_fetch_row($result);
 
-    $pages_navigation = new pages_navigation();
-    $pages_navigation->set_nb_items($nb[0]);
-    $pages_navigation->set_nb_items_per_page($this->my_config['lmt_list_maxitems']);
-    $pages_navigation->set_current_page($pagenum);
-    $pages_navigation->set_options(array(
+    $GPCPagesNavigation = new GPCPagesNavigation();
+    $GPCPagesNavigation->setNbItems($nb[0]);
+    $GPCPagesNavigation->setNbItemsPerPage($this->config['lmt_list_maxitems']);
+    $GPCPagesNavigation->setCurrentPage($pagenum);
+    $GPCPagesNavigation->setOptions(array(
       "text_prev" => l10n("lmt_nav_prev"),
       "text_next" => l10n("lmt_nav_next"),
@@ -1033,5 +1036,5 @@
       "text_last" => l10n("lmt_nav_last")
     ));
-    $navbar=$pages_navigation->make_navigation("loadpage");
+    $navbar=$GPCPagesNavigation->makeNavigation("loadpage");
     if($navbar!="")
     {
@@ -1045,3 +1048,4 @@
 } //class
 
+
 ?>
Index: extensions/lmt/lmt_install.class.inc.php
===================================================================
--- extensions/lmt/lmt_install.class.inc.php	(revision 5431)
+++ extensions/lmt/lmt_install.class.inc.php	(revision 5548)
@@ -13,7 +13,8 @@
 
   --------------------------------------------------------------------------- */
+
+   include_once('lmt_version.inc.php'); // => Don't forget to update this file !!
   @include_once('lmt_root.class.inc.php');
-  @include_once(PHPWG_PLUGINS_PATH.'grum_plugins_classes-2/tables.class.inc.php');
-
+  @include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/GPCTables.class.inc.php');
 
   /* lmt class for install process */
@@ -23,17 +24,29 @@
     private $exportfile;
 
-    public function LMT_Install($prefixeTable, $filelocation)
+    public function __construct($prefixeTable, $filelocation)
     {
       parent::__construct($prefixeTable, $filelocation);
-      $this->tablef= new manage_tables($this->tables);
-      $this->exportfile=dirname($this->filelocation).'/'.$this->plugin_name_files.'.sql';
+      $this->tablef= new GPCTables($this->tables);
+      $this->exportfile=dirname($this->getFileLocation()).'/'.$this->getPluginNameFiles().'.sql';
     }
 
-    /* 
-        function for installation process 
-        return true if install process is ok, otherwise false 
-    */ 
+    public function __destruct()
+    {
+      unset($this->tablef);
+      unset($this->exportfile);
+      parent::__destruct();
+    }
+
+    /*
+        function for installation process
+        return true if install process is ok, otherwise false
+    */
     public function install()
     {
+      $this->initConfig();
+      $this->loadConfig();
+      $this->config['installed']=LMT_VERSION2;
+      $this->saveConfig();
+
       $tables_def=array(
 "CREATE TABLE   `".$this->tables['images']."` (
@@ -44,6 +57,6 @@
   KEY `by_licence` (`licence_type`),
   KEY `by_author_id` (`author_id`)
-) 
-ENGINE=MyISAM 
+)
+ENGINE=MyISAM
 CHARACTER SET utf8 COLLATE utf8_general_ci",
 
@@ -59,9 +72,9 @@
 
       //if present, try to import backup
-      //if backup file 
+      //if backup file
       $import=$this->tablef->import($this->exportfile);
       if($import['errors']<0)
       {
-        $result=$this->tablef->create_tables($tables_def);
+        $result=$this->tablef->create($tables_def);
         return($result);
       }
@@ -79,6 +92,6 @@
     {
       $this->tablef->export($this->exportfile);
-      $this->delete_config();
-      $this->tablef->drop_tables();
+      $this->deleteConfig();
+      $this->tablef->drop();
       return('');
     }
@@ -88,7 +101,8 @@
       global $template;
 
-      $this->init_config();
-      $this->load_config();
-      $this->save_config();
+      $this->initConfig();
+      $this->loadConfig();
+      $this->config['installed']=LMT_VERSION2;
+      $this->saveConfig();
       return('');
     }
Index: extensions/lmt/lmt_pip.class.inc.php
===================================================================
--- extensions/lmt/lmt_pip.class.inc.php	(revision 5431)
+++ extensions/lmt/lmt_pip.class.inc.php	(revision 5548)
@@ -15,5 +15,5 @@
 
 include_once('lmt_root.class.inc.php');
-include_once(PHPWG_PLUGINS_PATH.'grum_plugins_classes-2/public_integration.class.inc.php');
+//include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/GPCPublicIntegration.class.inc.php');
 
 class LMT_PIP extends LMT_root
@@ -21,15 +21,17 @@
   protected $section_page;
 
-  public function LMT_PIP($prefixeTable, $filelocation)
+  public function __construct($prefixeTable, $filelocation)
   {
     parent::__construct($prefixeTable, $filelocation);
-    $this->load_config();
+    $this->loadConfig();
 
-    // don't create this object inside root classe otherwise header is modified
-    // everywhere in admin pages
-    $this->ajax = new Ajax();
+    $this->initEvents();
+    $this->load_lang();
+  }
 
-    $this->init_events();
-    $this->load_lang();
+  public function __destruct()
+  {
+    unset($section_page);
+    parent::__destruct();
   }
 
@@ -51,17 +53,17 @@
     initialize events call for the plugin
   */
-  public function init_events()
+  public function initEvents()
   {
-    parent::init_events();
+    parent::initEvents();
 /*
     add_event_handler('blockmanager_apply', array(&$this, 'blockmanager_apply') );
     add_event_handler('loading_lang', array(&$this, 'load_lang'));
 */
-    if($this->my_config['lmt_licence_activated']=='y')
+    if($this->config['lmt_licence_activated']=='y')
     {
-      add_event_handler('loc_end_page_header', array(&$this->css_icn, 'apply_CSS'));
+      add_event_handler('loc_end_page_header', array(&$this->css_icn, 'applyCSS'));
       add_event_handler('loc_end_picture', array(&$this, 'manage_licence_element'));
 
-      if($this->my_config['lmt_warning_visible']=='y')
+      if($this->config['lmt_warning_visible']=='y')
       {
         add_event_handler('loc_end_page_tail', array(&$this, 'manage_warning_text'));
@@ -85,10 +87,10 @@
     }
 
-    if($this->my_config['lmt_redirect_activated']=='y')
+    if($this->config['lmt_redirect_activated']=='y')
     {
-      $url=$this->my_config['lmt_redirect_url-'.strToLower($licence['licence'])][$user['language']];
+      $url=$this->config['lmt_redirect_url-'.strToLower($licence['licence'])][$user['language']];
       if($url=='')
       {
-        $url=$this->my_config['lmt_redirect_url-'.strToLower($licence['licence'])]['en_UK'];
+        $url=$this->config['lmt_redirect_url-'.strToLower($licence['licence'])]['en_UK'];
       }
     }
@@ -100,6 +102,6 @@
     $style="";
     $text="";
-    $target=($this->my_config['lmt_redirect_open_target']=="y")?" onclick='window.open(this.href); return false;'":"";
-    switch($this->my_config['lmt_licence_logo'])
+    $target=($this->config['lmt_redirect_open_target']=="y")?" onclick='window.open(this.href); return false;'":"";
+    switch($this->config['lmt_licence_logo'])
     {
       case '80x15':
@@ -144,30 +146,30 @@
 
 
-    if(isset($this->my_config['lmt_warning_texts'][$user['language']]))
+    if(isset($this->config['lmt_warning_texts'][$user['language']]))
     {
-      $text=$this->my_config['lmt_warning_texts'][$user['language']];
+      $text=$this->config['lmt_warning_texts'][$user['language']];
     }
     else
     {
-      $text=$this->my_config['lmt_warning_texts']['en_UK'];
+      $text=$this->config['lmt_warning_texts']['en_UK'];
     }
 
     $patterns = array('/\[logo=80x15\]/i', '/\[logo=88x31\]/i', '/\[logo=text\]/i');
     $replacements = array(
-      "<img class='logo80x15' src='". LMT_PATH."img/".strToLower($this->my_config['lmt_licence_default'])."_80x15.png'>",
-      "<img class='logo88x31' src='". LMT_PATH."img/".strToLower($this->my_config['lmt_licence_default'])."_88x31.png'>",
-      l10n("lmt_lbl_cc_s-".strToLower($this->my_config['lmt_licence_default']))
+      "<img class='logo80x15' src='". LMT_PATH."img/".strToLower($this->config['lmt_licence_default'])."_80x15.png'>",
+      "<img class='logo88x31' src='". LMT_PATH."img/".strToLower($this->config['lmt_licence_default'])."_88x31.png'>",
+      l10n("lmt_lbl_cc_s-".strToLower($this->config['lmt_licence_default']))
     );
 
-    if($this->my_config['lmt_redirect_activated']=='y')
+    if($this->config['lmt_redirect_activated']=='y')
     {
-      $url=$this->my_config['lmt_redirect_url-'.strToLower($this->my_config['lmt_licence_default'])][$user['language']];
+      $url=$this->config['lmt_redirect_url-'.strToLower($this->config['lmt_licence_default'])][$user['language']];
       if($url=='')
       {
-        $url=$this->my_config['lmt_redirect_url-'.strToLower($this->my_config['lmt_licence_default'])]['en_UK'];
+        $url=$this->config['lmt_redirect_url-'.strToLower($this->config['lmt_licence_default'])]['en_UK'];
       }
       if($url!="")
       {
-        $target=($this->my_config['lmt_redirect_open_target']=="y")?" onclick='window.open(this.href); return false;'":"";
+        $target=($this->config['lmt_redirect_open_target']=="y")?" onclick='window.open(this.href); return false;'":"";
         $replacements[0]="<a href='".$url."'".$target.">".$replacements[0]."</a>";
         $replacements[1]="<a href='".$url."'".$target.">".$replacements[1]."</a>";
Index: extensions/lmt/lmt_root.class.inc.php
===================================================================
--- extensions/lmt/lmt_root.class.inc.php	(revision 5431)
+++ extensions/lmt/lmt_root.class.inc.php	(revision 5548)
@@ -13,10 +13,9 @@
 
   --------------------------------------------------------------------------- */
-  include_once(PHPWG_PLUGINS_PATH.'grum_plugins_classes-2/common_plugin.class.inc.php');
-  include_once(PHPWG_PLUGINS_PATH.'grum_plugins_classes-2/css.class.inc.php');
-  include_once(PHPWG_PLUGINS_PATH.'grum_plugins_classes-2/ajax.class.inc.php');
-  global $ajax;
-
-  class LMT_root extends common_plugin
+  include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/CommonPlugin.class.inc.php');
+  include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/GPCCss.class.inc.php');
+  include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/GPCAjax.class.inc.php');
+
+  class LMT_root extends CommonPlugin
   {
     protected $css;   //the css object
@@ -25,19 +24,27 @@
     protected $licences=array('BY', 'BY-ND', 'BY-NC', 'BY-NC-ND', 'BY-NC-SA', 'BY-SA', 'CRIGHT', 'CLEFT', 'DEFAULT');
 
-    public function LMT_root($prefixeTable, $filelocation)
-    {
-      $this->plugin_name='LMT';
-      $this->plugin_name_files="lmt";
-      parent::common_plugin($prefixeTable, $filelocation);
-      $this->section_name=$this->plugin_name_files;
-
-      $this->set_tables_list(array('images', 'licence_author', 'licence_doc'));
-
-
-      $this->css = new css(dirname($this->filelocation).'/'.$this->plugin_name_files.".css");
-      $this->css_icn = new css(dirname($this->filelocation).'/'.$this->plugin_name_files."_icn.css");
-    }
-
-    public function init_events()
+    public function __construct($prefixeTable, $filelocation)
+    {
+      $this->setPluginName('LMT');
+      $this->setPluginNameFiles("lmt");
+      parent::__construct($prefixeTable, $filelocation);
+      $this->section_name=$this->getPluginNameFiles();
+
+      $this->setTablesList(array('images', 'licence_author'));
+
+
+      $this->css = new GPCCss(dirname($this->getFileLocation()).'/'.$this->getPluginNameFiles().".css");
+      $this->css_icn = new GPCCss(dirname($this->getFileLocation()).'/'.$this->getPluginNameFiles()."_icn.css");
+    }
+
+    public function __destruct()
+    {
+      unset($this->css);
+      unset($this->css_icn);
+      unset($this->licences);
+      parent::__destruct();
+    }
+
+    public function initEvents()
     {
       add_event_handler('blockmanager_register_blocks', array(&$this, 'register_blocks') );
@@ -54,12 +61,12 @@
 
     /*
-      surchage of common_plugin->save_config function
-    */
-    public function save_config()
-    {
-      if(parent::save_config())
-      {
-        $this->css->make_CSS($this->generate_CSS());
-        $this->css_icn->make_CSS($this->generate_CSS2());
+      surchage of CommonPlugin->saveConfig function
+    */
+    public function saveConfig()
+    {
+      if(parent::saveConfig())
+      {
+        $this->css->makeCSS($this->generate_CSS());
+        $this->css_icn->makeCSS($this->generate_CSS2());
         return(true);
       }
@@ -68,16 +75,16 @@
 
     /*
-      surchage of common_plugin->save_config function
-    */
-    public function load_config()
-    {
-      parent::load_config();
-      if(!$this->css->css_file_exists())
-      {
-        $this->css->make_CSS($this->generate_CSS());
-      }
-      if(!$this->css_icn->css_file_exists())
-      {
-        $this->css_icn->make_CSS($this->generate_CSS2());
+      surchage of CommonPlugin->saveConfig function
+    */
+    public function loadConfig()
+    {
+      parent::loadConfig();
+      if(!$this->css->fileExists())
+      {
+        $this->css->makeCSS($this->generate_CSS());
+      }
+      if(!$this->css_icn->fileExists())
+      {
+        $this->css_icn->makeCSS($this->generate_CSS2());
       }
     }
@@ -86,8 +93,8 @@
       intialize default values
     */
-    public function init_config()
+    public function initConfig()
     {
       //global $user;
-      $this->my_config=array(
+      $this->config=array(
         'lmt_mouseovercolor' => '303030', /**/
         'lmt_list_maxheight' => '650',
@@ -117,13 +124,13 @@
         $lang=substr($key,0,2)."/";
         if($lang=="en/") { $lang=""; }
-        $this->my_config['lmt_warning_texts'][$key]='';
-        $this->my_config['lmt_redirect_url-by'][$key]='http://creativecommons.org/licenses/by/2.0/'.$lang;
-        $this->my_config['lmt_redirect_url-by-nd'][$key]='http://creativecommons.org/licenses/by-nd/2.0/'.$lang;
-        $this->my_config['lmt_redirect_url-by-nc'][$key]='http://creativecommons.org/licenses/by-nc/2.0/'.$lang;
-        $this->my_config['lmt_redirect_url-by-nc-nd'][$key]='http://creativecommons.org/licenses/by-nc-nd/2.0/'.$lang;
-        $this->my_config['lmt_redirect_url-by-nc-sa'][$key]='http://creativecommons.org/licenses/by-nc-sa/2.0/'.$lang;
-        $this->my_config['lmt_redirect_url-by-sa'][$key]='http://creativecommons.org/licenses/by-sa/2.0/'.$lang;
-        $this->my_config['lmt_redirect_url-cright'][$key]='';
-        $this->my_config['lmt_redirect_url-cleft'][$key]='';
+        $this->config['lmt_warning_texts'][$key]='';
+        $this->config['lmt_redirect_url-by'][$key]='http://creativecommons.org/licenses/by/2.0/'.$lang;
+        $this->config['lmt_redirect_url-by-nd'][$key]='http://creativecommons.org/licenses/by-nd/2.0/'.$lang;
+        $this->config['lmt_redirect_url-by-nc'][$key]='http://creativecommons.org/licenses/by-nc/2.0/'.$lang;
+        $this->config['lmt_redirect_url-by-nc-nd'][$key]='http://creativecommons.org/licenses/by-nc-nd/2.0/'.$lang;
+        $this->config['lmt_redirect_url-by-nc-sa'][$key]='http://creativecommons.org/licenses/by-nc-sa/2.0/'.$lang;
+        $this->config['lmt_redirect_url-by-sa'][$key]='http://creativecommons.org/licenses/by-sa/2.0/'.$lang;
+        $this->config['lmt_redirect_url-cright'][$key]='';
+        $this->config['lmt_redirect_url-cleft'][$key]='';
       }
 
@@ -138,5 +145,5 @@
 .TableRow:hover
 {
-  background-color:#".$this->my_config['lmt_mouseovercolor'].";
+  background-color:#".$this->config['lmt_mouseovercolor'].";
 }
 
@@ -307,9 +314,9 @@
       }
 
-      if(($return["licence"]=="")&&($this->my_config["lmt_licence_visible"]=="y"))
+      if(($return["licence"]=="")&&($this->config["lmt_licence_visible"]=="y"))
       {
         $return=array(
           "defaut" => "y",
-          "licence" => $this->my_config["lmt_licence_default"],
+          "licence" => $this->config["lmt_licence_default"],
           "aut_text1" => "",
           "aut_text2" => ""
@@ -317,5 +324,5 @@
 
         $sql="SELECT * FROM ".$this->tables['licence_author']."
-              WHERE id = '".$this->my_config["lmt_licence_default_author"]."'";
+              WHERE id = '".$this->config["lmt_licence_default_author"]."'";
         $result=pwg_query($sql);
         if($result)
@@ -354,5 +361,5 @@
     }
 
-  protected function display_result($action_msg, $result)
+  protected function displayResult($action_msg, $result)
   {
     global $page;
Index: extensions/lmt/lmt_version.inc.php
===================================================================
--- extensions/lmt/lmt_version.inc.php	(revision 5548)
+++ extensions/lmt/lmt_version.inc.php	(revision 5548)
@@ -0,0 +1,19 @@
+<?php
+/* -----------------------------------------------------------------------------
+  Plugin     : LMT
+  Author     : Grum
+    email    : grum@grum.fr
+    website  : http://photos.grum.fr
+    PWG user : http://forum.piwigo.org/profile.php?id=3706
+
+    << May the Little SpaceFrog be with you ! >>
+  ------------------------------------------------------------------------------
+  See main.inc.php for release information
+
+  --------------------------------------------------------------------------- */
+
+  if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+  define('LMT_VERSION',  '1.2.0');
+  define('LMT_VERSION2', '01.02.00');
+?>
Index: extensions/lmt/main.inc.php
===================================================================
--- extensions/lmt/main.inc.php	(revision 5431)
+++ extensions/lmt/main.inc.php	(revision 5548)
@@ -76,8 +76,7 @@
 define('LMT_PATH' , PHPWG_PLUGINS_PATH . LMT_DIR . '/');
 
-define('LMT_VERSION' , '1.2.0'); // => ne pas oublier la version dans l'entête !!
+include_once('lmt_version.inc.php'); // => Don't forget to update this file !!
 
 global $prefixeTable;
-
 
 if(defined('IN_ADMIN'))
@@ -86,5 +85,5 @@
   include_once("lmt_aim.class.inc.php");
   $obj=new LMT_AIM($prefixeTable, __FILE__);
-  $obj->init_events();
+  $obj->initEvents();
 }
 else
Index: extensions/lmt/maintain.inc.php
===================================================================
--- extensions/lmt/maintain.inc.php	(revision 5431)
+++ extensions/lmt/maintain.inc.php	(revision 5548)
@@ -20,5 +20,5 @@
 //ini_set('display_errors', true);
 
-global $gpc_installed, $lang; //needed for plugin manager compatibility
+global $gpc_installed, $gpcNeeded, $lang; //needed for plugin manager compatibility
 
 /* -----------------------------------------------------------------------------
@@ -26,9 +26,10 @@
 ----------------------------------------------------------------------------- */
 $gpc_installed=false;
-if(file_exists(PHPWG_PLUGINS_PATH.'grum_plugins_classes-2/common_plugin.class.inc.php'))
+$gpcNeeded="3.0.0";
+if(file_exists(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/CommonPlugin.class.inc.php'))
 {
-  @include_once(PHPWG_PLUGINS_PATH.'grum_plugins_classes-2/main.inc.php');
-  // need GPC release greater or equal than 2.0.5
-  if(checkGPCRelease(2,0,5))
+  @include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/CommonPlugin.class.inc.php');
+  // need GPC release greater or equal than 3.0.0
+  if(CommonPlugin::checkGPCRelease(3,0,0))
   {
     @include_once('lmt_install.class.inc.php');
@@ -39,5 +40,14 @@
 function gpcMsgError(&$errors)
 {
-  array_push($errors, sprintf(l10n('lmt_gpc2_not_installed'), "2.0.5"));
+  global $gpcNeeded;
+  $msg=sprintf(l10n('To install this plugin, you need to install Grum Plugin Classes %s before'), $gpcNeeded);
+  if(is_array($errors))
+  {
+    array_push($errors, $msg);
+  }
+  else
+  {
+    $errors=Array($msg);
+  }
 }
 // -----------------------------------------------------------------------------
@@ -51,5 +61,5 @@
 function plugin_install($plugin_id, $plugin_version, &$errors)
 {
-  global $prefixeTable, $gpc_installed;
+  global $prefixeTable, $gpc_installed, $gpcNeeded;
 
   if($gpc_installed)
@@ -61,4 +71,5 @@
       array_push($errors, "error");
     }
+    GPCCore::register($obj->getPluginName(), LMT_VERSION, $gpcNeeded);
   }
   else
@@ -109,4 +120,5 @@
     $obj = new LMT_Install($prefixeTable, __FILE__);
     $obj->uninstall();
+    GPCCore::unregister($obj->getPluginName());
   }
   else
