Index: extensions/cl_conflit/admin/admin_conflit.php
===================================================================
--- extensions/cl_conflit/admin/admin_conflit.php	(revision 7904)
+++ extensions/cl_conflit/admin/admin_conflit.php	(revision 7905)
@@ -92,42 +92,5 @@
 
         $path = CONFLIT_PATH;
-          $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);
 
-$version = $plugin['version'] ;
 	 $conflit_parametres = cl_conflit_Get_Options();
 
Index: extensions/cl_conflit/admin/cl_conflit_admin.php
===================================================================
--- extensions/cl_conflit/admin/cl_conflit_admin.php	(revision 7904)
+++ extensions/cl_conflit/admin/cl_conflit_admin.php	(revision 7905)
@@ -91,45 +91,7 @@
 	$visible=true;	
 
-	$path = CONFLIT_PATH;
 
-          $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);
 
-			$version = $plugin['version'] ;
-			$cl_conflit_parametres = cl_conflit_Get_Options();
+$cl_conflit_parametres = cl_conflit_Get_Options();
 		if (isset($_POST['submit']))  {  
 			if ($_POST['submit'] == l10n('cl_conflit_save'))  {  
Index: extensions/cl_conflit/admin/template/admin.tpl
===================================================================
--- extensions/cl_conflit/admin/template/admin.tpl	(revision 7904)
+++ extensions/cl_conflit/admin/template/admin.tpl	(revision 7905)
@@ -2,32 +2,12 @@
  <script type="text/javascript">
      var DEBUG = '{$DEBUG}';
+     var theme = '{$theme}';
+     var cl_version = '{$cl_version}';
+     var cl_plugin = '{$cl_plugin}';
+
      var thumbnail = '{$thumbnail}';
      var theme = '{$theme}';
-     var version = '{$version}';
-     var scaled_width = '{$SCALED_WIDTH}'; // valeur par defaut
-     var scaled_height = '{$SCALED_HEIGHT}'; // valeur par defaut
-     var img_width = '{$IMG_WIDTH }';
-     var img_height = '{ $IMG_HEIGHT }';
-
-     var marge_basse = '{ $MARGE_BASSE }';
-     var echelle_max = '{ $ECHELLE_MAX }';
-     var mini_width = '{ $MINI_WIDTH   }';
-     var mini_height = '{ $MINI_HEIGHT   }';
-
-     var webmaster_width = '{$webmaster_width   }';
-     var webmaster_height = '{ $webmaster_height   }';
-     var admin_width = '{ $admin_width   }';
-     var admin_height = '{ $admin_height   }';
-     var generic_width = '{ $generic_width   }';
-     var generic_height = '{ $generic_height   }';
-     var guest_width = '{ $guest_width   }';
-     var guest_height = '{$guest_height}';
-     var normal_width = '{$normal_width}';
-     var normal_height = '{$normal_height}';
-     var user_status = '{$user_status}';
-
-     var check_auto_w = '{$check_auto_w}';
-
-     var check_desc_v = '{$check_desc_v}';
+     var cl_Query = '{$cl_query}';
+     var cl_type = '{$cl_type}';
 
      </script>
@@ -55,127 +35,18 @@
 </script>
 {/literal}
-<!--============== assign visible =======================-->	
-{assign var="affiche_cde" value="true"}
-{if $affiche_cde == "true"}
-  {assign var="visible" value="block"}
-{else}
-  {assign var="visible" value="none"}
-{/if}
-{if $check_auto_w == true} 
-     {assign var="visible_w" value="visible"}
-  {else}
-     {assign var="visible_w" value="hidden"}
-{/if}
+ 
 <div class="titrePage">
-		<h2>{'Autosize'|translate} {'version'|translate}{$version}</h2>
+		<h2>{'cl_conflit'} {'version'|translate}{$cl_version}</h2>
 </div>
-  <span>{'cl_conflit_Howto'|translate}</span>
+ 
 
 
-
-<!--============== !DIV ==={$IMG_WIDTH  }=={$IMG_HEIGHT  }======-->	
+   
 <table >
-  <form action="" method="post" name="form_conflit" id="form_conflit"    >
-
-  <table id="table0" style=" background:none;border:outset;width:90%; z-index:-500 " >
-    <fieldset>
-  	<legend class="cluetip" title="{'cl_conflit_config_title_1'|@translate}|{'cl_conflit_hlp_line1'|@translate}">{'cl_conflit_config_title_1'|@translate}</legend>
-        <td>{'User status'|@translate}</td>
-        <td>{'cl_conflit_height'|@translate}</td>
-        <td style="visibility:visible">{'cl_conflit_width'|@translate}
-         <input type="checkbox" name="check_auto_w" value="on"  {$check_auto_w}  /></td>
-         <td style="visibility:visible">{'cl_conflit_enabled'|@translate}
-        </td>
-
-        <tr>
-        <td>{'user_status_webmaster'|@translate}</td>
-        <td><input name="webmaster_height" id="Text7" type="text"  value ="{$webmaster_height}" /></td>
-        <td style="visibility:{$visible_w}"><input name="webmaster_width" id="webmaster_width" type="text"  value ="{$webmaster_width}" /></td>
-         <td ><input name="webmaster_enabled" id="webmaster_enabled" type="checkbox"  value ="on" {$webmaster_enabled}  /></td>
-        </tr>
-        <tr>
-        <td>{'user_status_admin'|@translate}</td>
-        <td><input name="admin_height" id="admin_height" type="text"  value ="{$admin_height}" /></td>
-        <td style="visibility:{$visible_w}"><input name="admin_width" id="admin_width" type="text"  value ="{$admin_width}" /></td>
-          <td ><input name="admin_enabled" id="admin_enabled" type="checkbox"  value ="on" {$admin_enabled} /></td>
-        </tr>
-        <tr>
-        <td>{'user_status_generic'|@translate}</td>
-        <td><input name="generic_height" id="Text1" type="text"  value ="{$generic_height}" /></td>
-        <td style="visibility:{$visible_w}"><input name="generic_width" id="generic_width" type="text"  value ="{$generic_width}" /></td>
-        <td ><input name="generic_enabled" id="generic_enabled" type="checkbox"  value ="on" {$generic_enabled} /></td>
-        </tr>
-        <tr>
-        <td>{'user_status_guest'|@translate}</td>
-        <td><input name="guest_height" id="Text3" type="text"  value ="{$guest_height}" /></td>
-        <td style="visibility:{$visible_w}"><input name="guest_width" id="guest_width" type="text"  value ="{$guest_width}" /></td>
-         <td ><input name="guest_enabled" id="guest_enabled" type="checkbox"  value ="on" {$guest_enabled} /></td>
-        </tr>
-        <tr>
-        <td>{'user_status_normal'|@translate}</td>
-        <td><input name="normal_height" id="Text5" type="text"  value ="{$normal_height}" /></td>
-        <td style="visibility:{$visible_w}"><input name="normal_width" id="normal_width" type="text"  value ="{$normal_width}" /></td>
-         <td ><input name="normal_enabled" id="normal_enabled" type="checkbox"  value ="on" {$normal_enabled} /></td>
-        </tr>
-
-  </fieldset>
-
-  </table>
-
-<br />
- <table id="table_d" style=" background:none;border:outset;width:90%; z-index:-500 " >
-   <fieldset>
-  	<legend class="cluetip" title="{'cl_conflit_config_title_2'|@translate}|{'cl_conflit_hlp_line2'|@translate}">{'cl_conflit_config_title_2'|@translate}</legend>
+  <form action="" method="post" name="form_conflit" id="form_conflit"    >  
  
-    <!--======== Dimensions HL ===================-->	
-    <tr> 
-      <td class="cluetip" title="{'cl_conflit_miniheight'|@translate}|{'cl_conflit_hlp_line3'|@translate}" >{'cl_conflit_miniheight'|translate}</td>
-      <td ><input name="mini_height" id="mini_height" type="text"  value ="{$MINI_HEIGHT}" /> px 
-           </td> 
-	 
-     <td class="cluetip" title="{'cl_conflit_miniwidth'|translate}|{'cl_conflit_hlp_line3'|@translate}"  > {'cl_conflit_miniwidth'|translate}</td>
-   <td  >
-    <input name="mini_width"  id="mini_width" type="text" value =  "{$MINI_WIDTH}" /> px
-       </tr>
-   <!--======== Positions  ===================-->	
-<tr >
- <td class="cluetip" title="{'cl_conflit_echelle_max'|translate}|{'cl_conflit_hlp_line4'|@translate}" > {'cl_conflit_echelle_max'|translate}</td>
- <td  >
- <input name="echelle_max" id="echelle_max"  type="text" value ="{$ECHELLE_MAX}" /> 
- </td>
- 
-</tr>
-
-<tr >  
-<td class="cluetip" title="{'cl_conflit_marge_basse'|translate}|{'cl_conflit_hlp_line5'|@translate}" > {'cl_conflit_marge_basse'|translate}</td>
-<td><input name="marge_basse" id="marge_basse"  type="text" value =  "{$MARGE_BASSE}" /> px</td>
-
-</tr>		  
-
-  <!--======================================================================================-->	
-     <tr >
-	 
-	 </tr>
-
-
-  </fieldset>
- </table>
- <!--=================== Bloc choix =============================-->	 
- <table>
-  <tr><td style="visibility:visible">{'cl_conflit_icon_view'|@translate}
-         <input type="checkbox" name="check_icon_v" value="on"  {$check_icon_v}  />
-  </td>
-  <td>{'cl_conflit_desc_view'|@translate}
-         <input type="checkbox" name="check_desc_v" value="on"  {$check_desc_v}  />
-  </td>
-  <td>
-  </td>
-  
-  </tr>
-</table>
- 
-  <table>
-  <td><input name="submit" type="submit" value="{'cl_conflit_save'|@translate}" /></td>
-</table> 
+    <table>
+       <td><input name="submit" type="submit" value="{'cl_conflit_save'|@translate}" /></td>
+    </table> 
 </form>
  
Index: extensions/cl_conflit/conflit.inc.php
===================================================================
--- extensions/cl_conflit/conflit.inc.php	(revision 7904)
+++ extensions/cl_conflit/conflit.inc.php	(revision 7905)
@@ -33,5 +33,8 @@
  static public function cl_conflit_script()
 	{
+
+
 	   global  $template,$user,$conf,$picture ,$page,$cl_plugin;
+ 
 	   	$my_path =  basename(dirname(__FILE__)).'/' ;
 	    $my_path = dirname(__FILE__).'/';
@@ -43,5 +46,5 @@
   		$template->assign(
   						array( 
-						'version' => $cl_plugin['version'] ,
+						'cl_version' => $cl_plugin['version'] ,
 						'name' => $cl_plugin['id'] ,
 						'cl_conflit' => $cl_conflit  ,
@@ -53,5 +56,5 @@
 		if(	$page['body_id'] == 'theAdminPage' ) return ;
 		return $template->parse( 'cl_conflit_init', false);
-	}// function cl_autosize_script
+	}// function cl_conflit_script
 //=================================================================================
 /*
@@ -70,5 +73,5 @@
 			$template->assign(
   					array(						
-					    'version' => $cl_plugin['version'] ,
+					    'cl_version' => $cl_plugin['version'] ,
 						'name' => $cl_plugin['id'] ,
 						'ma_page' =>	$page['body_id'],
@@ -88,5 +91,5 @@
 
 
- }// function cl_autosize_script_2
+ }// function cl_conflit_script_2
 
  //=================================================================
@@ -109,6 +112,6 @@
 if ($ThePicture['is_picture'] <> 1 )  	{  return $content;  ; }	
 
-	 $autosizejs = '<script type="text/javascript" charset="utf-8"  src="';
-	      $autocss =   $autosizejs.'themes/default/js/jquery.packed.js"></script>'."\n"; 
+	 $cl_conflitjs = '<script type="text/javascript" charset="utf-8"  src="';
+	      $autocss =   $cl_conflitjs.'themes/default/js/jquery.packed.js"></script>'."\n"; 
 		  $template->append('head_elements',$autocss);
 
@@ -121,9 +124,62 @@
 
 
- }// function cl_autosize_script_3
-
+ }// function cl_conflit_script_3
+ 	/*
+	*
+	*/
+	static public function cl_conflit_admin($menu)
+		{
+		global  $lang ;
+		array_push($menu, array('NAME' => 'cl_conflit',
+		'URL' => get_admin_plugin_menu_link(CONFLIT_PATH . 'admin/cl_conflit_admin.php')));
+		return $menu;
+	} //function cl_conflit_admin
 
 } // class
+	/*
+	*
+	*/
+ function cl_conflit_Get_Options()
+  {
+		global $conf,$cl_conflit_parametres; 
+  		$cl_conflit_parametres =  unserialize($conf['cl_conflit']);
+		$cl_conflit_parametres =  cl_conflit_Set_Options();
+		return $cl_conflit_parametres;
+  }
+	/*
+	*
+	*/
+function cl_conflit_Set_Options()
+  {
 
+  global $cl_conflit_parametres;
+//=============================================================================
+$cl_conflit_parametres->query =(isset($_POST['query'])) ? $_POST['query'] : ((isset($cl_conflit_parametres->query )) ? $cl_conflit_parametres->query : '' ) ;
+$cl_conflit_parametres->type=(isset($_POST['type']))? $_POST['type']: ((isset($cl_conflit_parametres->type)) ? $cl_conflit_parametres->type:  '') ;
+
+ 
+return $cl_conflit_parametres;
+}
+	/*
+	*
+	*/
+function cl_conflit_sauve_options_inf()
+{
+global $options,$infos_message,$conf,$cl_conflit_parametres  ;
+$infos_message .=l10n("cl_conflit_save_config")."<br>";
+ $cl_conflit_parametres=cl_conflit_Set_Options();
+
+ if ( isset($cl_conflit_parametres) )
+ 	{
+ 
+		$query = '
+    		UPDATE '.CONFIG_TABLE.'
+    		SET value="'.addslashes(serialize($cl_conflit_parametres)).'"
+    		WHERE param = "cl_conflit"
+    		LIMIT 1';
+ 			pwg_query($query);
+	  }
+	 
+ }
 
 
Index: extensions/cl_conflit/include/affiche.php
===================================================================
--- extensions/cl_conflit/include/affiche.php	(revision 7904)
+++ extensions/cl_conflit/include/affiche.php	(revision 7905)
@@ -1,48 +1,10 @@
 <?php  
 
-          $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);
-
-$version = $plugin['version'] ;
- 
+	
 
 $visible=(isset($visible))?$visible:false;
 $img_width=isset($picture['current']['width'])?$picture['current']['width']:480;
 $img_height=isset($picture['current']['height'])?$picture['current']['height']:320;
-$version=isset($version)?$version:"";
+$cl_version=isset($cl_version)?$cl_version:"";
 $theme=$user['theme'];
  
@@ -50,7 +12,7 @@
   	$template->assign(
   					array(
-					'version' => $version,
+					'cl_version' => $cl_version,
 					'cl_plugin' => $cl_plugin,
-                    'version' => $version,
+                    'cl_version' => $cl_version,
                     'CONFLIT_PATH' => CONFLIT_PATH,
                     'theme' => $theme,
Index: extensions/cl_conflit/include/constants.php
===================================================================
--- extensions/cl_conflit/include/constants.php	(revision 7904)
+++ extensions/cl_conflit/include/constants.php	(revision 7905)
@@ -2,6 +2,45 @@
 global $prefixeTable;
 if (!defined('CL_CONFLIT_TABLE')) define('CL_CONFLIT_TABLE', $prefixeTable.'cl_conflit');
+$path = CONFLIT_PATH;
+          $plg_data = implode( '', file($path.'main.inc.php') );
+          if ( preg_match("|Plugin Name: (.*)|", $plg_data, $val) )
+          {
+            $conflit_plugin['name'] = trim( $val[1] );
+          }
+          if (preg_match("|Version: (.*)|", $plg_data, $val))
+          {
+            $conflit_plugin['version'] = trim($val[1]);
+          }
+          if ( preg_match("|Plugin URI: (.*)|", $plg_data, $val) )
+          {
+            $conflit_plugin['uri'] = trim($val[1]);
+          }
+          if ($desc = load_language('description.txt', $path.'/', array('return' => true)))
+          {
+            $conflit_plugin['description'] = trim($desc);
+          }
+          elseif ( preg_match("|Description: (.*)|", $plg_data, $val) )
+          {
+            $conflit_plugin['description'] = trim($val[1]);
+          }
+          if ( preg_match("|Author: (.*)|", $plg_data, $val) )
+          {
+            $conflit_plugin['author'] = trim($val[1]);
+          }
+          if ( preg_match("|Author URI: (.*)|", $plg_data, $val) )
+          {
+            $conflit_plugin['author uri'] = trim($val[1]);
+          }
+          if (!empty($conflit_plugin['uri']) and strpos($conflit_plugin['uri'] , 'extension_view.php?eid='))
+          {
+            list( , $extension) = explode('extension_view.php?eid=', $conflit_plugin['uri']);
+            if (is_numeric($extension)) $conflit_plugin['extension'] = $extension;
+          }
+          // IMPORTANT SECURITY !
+          $conflit_plugin = array_map('htmlspecialchars', $conflit_plugin);
 
-
-
+global $cl_plugin, $cl_version;
+ $cl_version = $conflit_plugin['version'] ;
+ $cl_plugin  = $conflit_plugin;
+ 
 ?>
Index: extensions/cl_conflit/main.inc.php
===================================================================
--- extensions/cl_conflit/main.inc.php	(revision 7904)
+++ extensions/cl_conflit/main.inc.php	(revision 7905)
@@ -2,5 +2,5 @@
 /*
 Plugin Name: cl_conflit
-Version: 1.0.0
+Version: 1.0.1
 Description: gestion des conflits entre jQuery et les autres librairies
 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=474
@@ -16,10 +16,10 @@
 	 
 //============================================================================		
-		  global $cl_version , $cl_plugin ;
-		  $cl_version = $plugin;
-		  $cl_plugin = $plugin;
+  include ($path."include/constants.php"); 	   
 //============================================================================
 include_once(CONFLIT_PATH.'conflit.inc.php');	
+
 $conflit_controler = new conflit_controler();
+add_event_handler('get_admin_plugin_menu_links', array(&$conflit_controler,'cl_conflit_admin')  );
 
 add_event_handler('loc_after_page_header', array(&$conflit_controler, 'cl_conflit_script'),  EVENT_HANDLER_PRIORITY_NEUTRAL+20 ,  2);
Index: extensions/cl_conflit/template/autosize.tpl
===================================================================
--- extensions/cl_conflit/template/autosize.tpl	(revision 7904)
+++ extensions/cl_conflit/template/autosize.tpl	(revision 7905)
@@ -15,5 +15,5 @@
     var theme = '{$theme}';
     var visible = '{$visible}';
-    var version = '{$version}';
+    var cl_version = '{$cl_version}';
 
     var scaled_width =  '{$SCALED_WIDTH}'; // valeur par defaut
Index: extensions/cl_conflit/template/conflit.tpl
===================================================================
--- extensions/cl_conflit/template/conflit.tpl	(revision 7904)
+++ extensions/cl_conflit/template/conflit.tpl	(revision 7905)
@@ -8,5 +8,5 @@
     var DEBUG = '{$DEBUG}';
     var theme = '{$theme}';
-    var Version = '{$version}';
+    var cl_version = '{$cl_version}';
     var cl_plugin = '{$cl_plugin}';
 </script>
