Index: extensions/cl_conflit/conflit.inc.php
===================================================================
--- extensions/cl_conflit/conflit.inc.php	(revision 8187)
+++ extensions/cl_conflit/conflit.inc.php	(revision 8629)
@@ -2,5 +2,5 @@
 // +-----------------------------------------------------------------------+
 // | Piwigo - a PHP based picture gallery                                  |
-// | cl_conflit                                                             |
+// | cl_conflit                                                            |
 // +-----------------------------------------------------------------------+
 // | Copyright(C) 2010      cljosse                                        |
@@ -29,19 +29,19 @@
 //============================================================
  /*
-  *  cl_conflit_script
+  *  cl_conflit_script_1
  */
- static public function cl_conflit_script()
+ static public function cl_conflit_script_1()
 	{
-	   global  $template,$user,$conf,$picture ,$page,$cl_plugin;
- 
+		global  $template,$user,$conf,$picture ,$page,$cl_plugin;
+		if (isset( $page['body_id']) && $page['body_id']=='theAdminPage'  ) return ;
+		$ma_page=isset($page['body_id'])?$page['body_id']:"" ;
+		if ($ma_page=='thePiwiShackControllerPage') return ;
 	   	$my_path =  basename(dirname(__FILE__)).'/' ;
 	    $my_path = dirname(__FILE__).'/';
 		$template->set_filenames(array('cl_conflit_init'=>$my_path. "template/conflit.tpl" ) );	
-		$debug = isset($conf['debug']) ? $conf['debug'] : false ; 
-$cl_conflit_parametres =	 cl_conflit_Get_Options() ;
-
-		 	
+		$DEBUG =  isset($conf['cl_debug']) ? $conf['cl_debug'] : "false"  ; 
+		$cl_conflit_parametres =	 cl_conflit_Get_Options() ;
 		$theme=$user['theme'];
-		
+		$url = get_root_url();		
   		$template->assign(
   						array( 
@@ -50,26 +50,24 @@
 						'cl_version' => $cl_plugin['version'] ,
 						'name' => $cl_plugin['name'] ,
-						 
+						'MY_ROOT' => $url,						 
 						'theme' => $theme  ,
-						'DEBUG' => $debug   ,
-						'CONFLIT_ROOT' => CONFLIT_PATH)
+						'DEBUG' => $DEBUG   ,
+						'CONFLIT_PATH' => CONFLIT_PATH)
 						 );
-
-		if(	$page['body_id'] == 'theAdminPage' ) return ;
+	
 		return $template->parse( 'cl_conflit_init', false);
-	}// function cl_conflit_script
+	}// function cl_conflit_script_1
 //=================================================================================
 /*
- *
+ * cl_conflit_script_2
 */
  static public function cl_conflit_script_2()
  {
 		global  $template,$user,$conf,$picture ,$page,$cl_plugin;
-	 
-			$my_path =  basename(dirname(__FILE__)).'/' ;
 			$my_path = dirname(__FILE__).'/';
-			$debug = isset($conf['debug']) ? $conf['debug'] : false ; 
-			 
-			$theme=$user['theme'];
+			$DEBUG =  isset($conf['cl_debug']) ? $conf['cl_debug'] : "false"  ; 
+			$ma_page=isset($page['body_id'])?$page['body_id']:"" ;			 
+			$theme=$user['theme'];				
+			if ($ma_page=='thePiwiShackControllerPage') return ;
 
 			$template->assign(
@@ -77,56 +75,23 @@
 					    'cl_version' => $cl_plugin['version'] ,
 						'name' => $cl_plugin['name'] ,
-						'ma_page' =>	$page['body_id'],
+						'ma_page' =>	$ma_page,
 						 
 						'theme' => $theme  ,
-						'DEBUG' => $debug   ,
-						'CONFLIT_ROOT' => CONFLIT_PATH)
+						'DEBUG' => $DEBUG   ,
+						'CONFLIT_PATH' => CONFLIT_PATH)
 						);
 						 
-		$autoscript="<script type='text/javascript'>
-	 
-	if (typeof (save_framework) == 'function')
-	save_framework('".$page['body_id']."');
-</script>";
-		$template->append('footer_elements',$autoscript);  
-		return ;
-
-
+				$autoscript="<script type='text/javascript'>
+				/* cl_conflit_script_2 */	 
+				if (typeof (save_framework) == 'function')
+					save_framework('".$page['body_id']."');
+				</script>";
+			$template->append('footer_elements',$autoscript);  
+			return ;
  }// function cl_conflit_script_2
 
- //=================================================================
- /*
- *  
- */
- static public function cl_conflit_script_3($content)
- {
-	   global  $template,$user,$conf,$picture ,$page,$cl_plugin;
-	    
-			$my_path =  basename(dirname(__FILE__)).'/' ;
-			$my_path = dirname(__FILE__).'/';
-			$debug = isset($conf['debug']) ? $conf['debug'] : false ; 
-			 
-			$theme=$user['theme'];
-
-$ThePicture = $template->get_template_vars('current');
-$tpl_name =   $user['theme'] ;
-if ( !empty($content) )   {  return $content;  }	
-if ($ThePicture['is_picture'] <> 1 )  	{  return $content;  ; }	
-
-	 $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);
-
-		$autocss="<script type='text/javascript'>
-    //   jQuery('#theImage').css({opacity:'0.0'});
-</script>";
-
-		$template->append('footer_elements',"\n".$autocss);
-		return $content ;
-
-
- }// function cl_conflit_script_3
+    //================================================
  	/*
-	*
+	* cl_conflit_admin
 	*/
 	static public function cl_conflit_admin($menu)
@@ -184,7 +149,3 @@
 	 
  }
-
-
-
-
 ?>
