Index: /extensions/Autosize/admin/admin_autosize.php
===================================================================
--- /extensions/Autosize/admin/admin_autosize.php	(revision 8911)
+++ /extensions/Autosize/admin/admin_autosize.php	(revision 8912)
@@ -29,4 +29,9 @@
    PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/'
 );
+if (!defined('ROOT_URL')) 
+define(  'ROOT_URL',  get_root_url().'/' );
+if (!defined('AUTOSIZE_PATH_ABS')) 
+define('AUTOSIZE_PATH_ABS', dirname(__FILE__).'/' );
+
 // +-----------------------------------------------------------------------+
 // | Check Access and exit when user status is not ok                      |
@@ -45,5 +50,5 @@
                 $my_base_url.'&amp;tab=autosize_admin'
 			   );
- 
+ /*	
 $tabsheet->add( 'autosize_help',
                 l10n('help'),
@@ -51,5 +56,5 @@
 			   );
 			   
-			   
+	*/	   
 			   
 	if (!isset($_GET['tab']))
Index: /extensions/Autosize/admin/template/admin.tpl
===================================================================
--- /extensions/Autosize/admin/template/admin.tpl	(revision 8911)
+++ /extensions/Autosize/admin/template/admin.tpl	(revision 8912)
@@ -34,5 +34,11 @@
 
      </script>
-    {known_script id="jquery" src="themes/default/js/jquery.packed.js"}
+ 
+  {if PHPWG_VERSION < 2.2 } 
+  {include file=$AUTOSIZE_PATH_ABS|@cat:'admin/template/header_2_1.tpl'}
+{else} 
+{include file= $AUTOSIZE_PATH_ABS|@cat:'admin/template/header_2_2.tpl'}
+ {/if} 
+ 
    
 {/html_head}
@@ -40,9 +46,5 @@
 {* $Id: autosize admin.tpl  *}
  <!--- HEAD autosize TPL --->
-{known_script id="jquery.cluetip" src=$ROOT_URL|@cat:"themes/default/js/plugins/jquery.cluetip.packed.js"}
-{known_script id="jquery.ui"      src=$ROOT_URL|@cat:"themes/default/js/ui/ui.core.js"}
-{known_script id="jquery.ui.resizable" src=$ROOT_URL|@cat:"themes/default/js/ui/ui.resizable.js"}
-{known_script id="jquery.ui.slider" src=$ROOT_URL|@cat:"themes/default/js/ui/ui.slider.js"}
-{known_script id="jquery.ui.draggable" src=$ROOT_URL|@cat:"themes/default/js/ui/ui.draggable.js"}
+
 {literal}
 <script type="text/javascript">
Index: /extensions/Autosize/admin/template/header_2_1.tpl
===================================================================
--- /extensions/Autosize/admin/template/header_2_1.tpl	(revision 8912)
+++ /extensions/Autosize/admin/template/header_2_1.tpl	(revision 8912)
@@ -0,0 +1,11 @@
+﻿{known_script id="jquery" src = $ROOT_URL|@cat:"themes/default/js/jquery.packed.js" now=0}
+{known_script id="jquery.cluetip" src=$ROOT_URL|@cat:"themes/default/js/plugins/jquery.cluetip.packed.js"} 
+{known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/ui.core.js"}
+{known_script id="jquery.ui.resizable" src=$ROOT_URL|@cat:"themes/default/js/ui/ui.resizable.js"}
+{known_script id="jquery.ui.slider" src=$ROOT_URL|@cat:"themes/default/js/ui/ui.slider.js"}
+{known_script id="jquery.ui.draggable" src=$ROOT_URL|@cat:"themes/default/js/ui/ui.draggable.js"}
+
+{known_script id="conflit_script" src = $AUTOSIZE_PATH|@cat:"js/conflit.js"  } 
+{known_script id="dimensions" src = $AUTOSIZE_PATH|@cat:"js/jquery.dimensions.js"  } 
+
+
Index: /extensions/Autosize/admin/template/header_2_2.tpl
===================================================================
--- /extensions/Autosize/admin/template/header_2_2.tpl	(revision 8912)
+++ /extensions/Autosize/admin/template/header_2_2.tpl	(revision 8912)
@@ -0,0 +1,12 @@
+﻿{combine_script id="jquery" load="header" path = $ROOT_URL|@cat:"themes/default/js/jquery.js"
+} {combine_script id="jquery.cluetip" path = $ROOT_URL|@cat:"themes/default/js/plugins/jquery.cluetip.js"
+require="jquery" } {combine_script id="conflit_script" path = $AUTOSIZE_PATH|@cat:"js/conflit.js"
+require="jquery"} {combine_script id="dimensions" path = $AUTOSIZE_PATH|@cat:"js/jquery.dimensions.js"
+require="jquery"} 
+ 
+{combine_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/ui.core.js" require="jquery"}
+{combine_script id="jquery.ui.resizable" src=$ROOT_URL|@cat:"themes/default/js/ui/ui.resizable.js" require="jquery,jquery.ui"}
+{combine_script id="jquery.ui.slider" src=$ROOT_URL|@cat:"themes/default/js/ui/ui.slider.js"
+require="jquery,jquery.ui"}
+{combine_script id="jquery.ui.draggable" src=$ROOT_URL|@cat:"themes/default/js/ui/ui.draggable.js"
+require="jquery,jquery.ui"}
Index: /extensions/Autosize/admin/template/help.tpl
===================================================================
--- /extensions/Autosize/admin/template/help.tpl	(revision 8911)
+++ /extensions/Autosize/admin/template/help.tpl	(revision 8912)
@@ -1,5 +1,4 @@
-﻿{html_head} {known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"}
-{known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js"}
-{known_script id="jquery.ui.resizable" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.resizable.packed.js"}
+﻿{html_head} {if PHPWG_VERSION < 2.2 } {include file=$AUTOSIZE_PATH_ABS|@cat:'admin/template/header_2_1.tpl'}
+{else} {include file= $AUTOSIZE_PATH_ABS|@cat:'admin/template/header_2_2.tpl'} {/if}
 {/html_head}
 <form action="" method="post">
Index: /extensions/Autosize/include/affiche.php
===================================================================
--- /extensions/Autosize/include/affiche.php	(revision 8911)
+++ /extensions/Autosize/include/affiche.php	(revision 8912)
@@ -13,8 +13,12 @@
 $theme=$user['theme'];
 $user_status = $user['status'] ;
- 
-                   $template->assign( array( 'AUTOSIZE_PATH_ABS' => AUTOSIZE_PATH_ABS
+
+                   $template->assign( array( 
+                   'AUTOSIZE_PATH_ABS' => AUTOSIZE_PATH_ABS,
+                   'ROOT_URL' => ROOT_URL,
+                   'AUTOSIZE_PATH' => AUTOSIZE_PATH,
 											)
-									);		
+									);	
+                                    	
   	$template->assign(
   					array(
@@ -27,6 +31,5 @@
 					'thumbnail' => $conf['prefix_thumbnail'],
                     'visible' => $visible,
-                     'ROOT_URL' => get_root_url()  ,
-                    'AUTOSIZE_PATH' => AUTOSIZE_PATH,
+
                     'theme' => $theme,
 					 'SCALED_WIDTH' => $picture['current']['scaled_width'],
Index: tensions/Autosize/template/cl_conflit.tpl
===================================================================
--- /extensions/Autosize/template/cl_conflit.tpl	(revision 8911)
+++ 	(revision )
@@ -1,9 +1,0 @@
-{html_head}
-
-{known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js" } 
-{known_script id="conflit_script" src=$AUTOSIZE_PATH|@cat:"js/conflit.js"}
-	{/html_head}
-
-<!---{$ROOT_URL} -- {$AUTOSIZE_PATH} template/cl_confilt.tpl (body) ---> 
- 
-<!---FIN  {$AUTOSIZE_PATH} template/cl_confilt.tpl (body) --->
Index: tensions/Autosize/template/cl_conflit3.tpl
===================================================================
--- /extensions/Autosize/template/cl_conflit3.tpl	(revision 8911)
+++ 	(revision )
@@ -1,7 +1,0 @@
-<!--- {$AUTOSIZE_PATH} template/cl_confilt3.tpl (body) ---> 
-  <script type="text/javascript">
-      //  window.$ =_$2 ;
-      
-</script>
-<!--- {$AUTOSIZE_PATH} template/cl_confilt3.tpl (body) ---> 
- 	 
Index: /extensions/Autosize/template/header_2_1.tpl
===================================================================
--- /extensions/Autosize/template/header_2_1.tpl	(revision 8911)
+++ /extensions/Autosize/template/header_2_1.tpl	(revision 8912)
@@ -1,4 +1,11 @@
-﻿{known_script id="jquery" src = $ROOT_URL|@cat:"themes/default/js/jquery.js" now=1} 
-{known_script id="jquery.cluetip" src = $ROOT_URL|@cat:"themes/default/js/plugins/jquery.cluetip.js"   } 
+﻿{known_script id="jquery" src = $ROOT_URL|@cat:"themes/default/js/jquery.packed.js" now=1}
+{known_script id="jquery.cluetip" src=$ROOT_URL|@cat:"themes/default/js/plugins/jquery.cluetip.packed.js"} 
+{known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/ui.core.js"}
+{known_script id="jquery.ui.resizable" src=$ROOT_URL|@cat:"themes/default/js/ui/ui.resizable.js"}
+{known_script id="jquery.ui.slider" src=$ROOT_URL|@cat:"themes/default/js/ui/ui.slider.js"}
+{known_script id="jquery.ui.draggable" src=$ROOT_URL|@cat:"themes/default/js/ui/ui.draggable.js"}
+
 {known_script id="conflit_script" src = $AUTOSIZE_PATH|@cat:"js/conflit.js"  } 
 {known_script id="dimensions" src = $AUTOSIZE_PATH|@cat:"js/jquery.dimensions.js"  } 
+
+
Index: /extensions/Autosize/template/header_2_2.tpl
===================================================================
--- /extensions/Autosize/template/header_2_2.tpl	(revision 8911)
+++ /extensions/Autosize/template/header_2_2.tpl	(revision 8912)
@@ -1,5 +1,4 @@
-﻿{combine_script id="jquery" load="header" path = $ROOT_URL|@cat:"themes/default/js/jquery.js"
-} {combine_script id="jquery.cluetip" path = $ROOT_URL|@cat:"themes/default/js/plugins/jquery.cluetip.js"
-require="jquery" } {combine_script id="conflit_script" path = $AUTOSIZE_PATH|@cat:"js/conflit.js"
-require="jquery"} {combine_script id="dimensions" path = $AUTOSIZE_PATH|@cat:"js/jquery.dimensions.js"
-require="jquery"} 
+﻿{combine_script id="jquery" load="header" path = $ROOT_URL|@cat:"themes/default/js/jquery.js"} 
+{combine_script id="jquery.cluetip" path = $ROOT_URL|@cat:"themes/default/js/plugins/jquery.cluetip.js" require="jquery" } 
+{combine_script id="conflit_script" path = $AUTOSIZE_PATH|@cat:"js/conflit.js" require="jquery"}
+{combine_script id="dimensions" path = $AUTOSIZE_PATH|@cat:"js/jquery.dimensions.js" require="jquery"} 
