Index: /extensions/DynamicResize/admin/admin.php
===================================================================
--- /extensions/DynamicResize/admin/admin.php	(revision 12181)
+++ /extensions/DynamicResize/admin/admin.php	(revision 12181)
@@ -0,0 +1,32 @@
+<?php
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+global $conf, $template, $page;
+
+load_language('plugin.lang', DR_PATH);
+$conf['dynamicResize'] = explode(',', $conf['dynamicResize']);
+
+if (isset($_POST['submit']))
+{
+  $conf['dynamicResize'] = array(
+    $_POST['debugMode'],
+    $_POST['dynMode'],
+    );
+  
+  conf_update_param('dynamicResize', implode(',', $conf['dynamicResize']));
+  array_push($page['infos'], l10n('Information data registered in database'));
+  
+  // the prefilter changes, we must delete compiled templatess
+  $template->delete_compiled_templates();
+}
+
+$template->assign(array(
+  'button_size' => $conf['dynamicResize'][0],
+  'position' => $conf['dynamicResize'][1],
+  'DR_PATH' => DR_PATH,
+));
+
+$template->set_filename('dr_content', dirname(__FILE__).'/admin.tpl');
+$template->assign_var_from_handle('ADMIN_CONTENT', 'dr_content');
+
+?>
Index: /extensions/DynamicResize/admin/admin.tpl
===================================================================
--- /extensions/DynamicResize/admin/admin.tpl	(revision 12181)
+++ /extensions/DynamicResize/admin/admin.tpl	(revision 12181)
@@ -0,0 +1,21 @@
+<div class="titrePage">
+  <h2>Dynamic Resize</h2>
+</div>
+<p>
+Configuration de DynamicResize
+</p>
+<form method="post" action="{$DYNAMIC_RESIZE_F_ACTION}" class="general">
+<fieldset>
+	<legend>Dynamic Resize</legend>
+    <label>is debugMode
+	   <input type="text" name="DEBUG_MODE" value="{$DEBUG_MODE}" />
+    </label>
+    <br/>
+    <!--<label>Variable 2 du fichier de configuration
+	   <input type="text" name="TESTPLUGIN_VAR2" value="{$TESTPLUGIN_VAR2}" />
+    </label>
+-->
+</fieldset>
+ 
+<p><input type="submit" value="Enregistrer" name="submit" /></p>
+</form>
Index: /extensions/DynamicResize/admin/dynamic_resize_admin.php
===================================================================
--- /extensions/DynamicResize/admin/dynamic_resize_admin.php	(revision 12181)
+++ /extensions/DynamicResize/admin/dynamic_resize_admin.php	(revision 12181)
@@ -0,0 +1,20 @@
+<?php
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+ 
+$me = get_plugin_data($plugin_id);
+ 
+if (isset($_POST['submit']))
+{
+  $me->my_config['DynamicResize'] = $_POST['DEBUG_MODE'];
+//  $me->my_config['TestPlugin2'] = $_POST['TESTPLUGIN_VAR1'];
+  $me->save_config();
+}
+ 
+global $template;
+$template->set_filenames( array('plugin_admin_content' => dirname(__FILE__).'/dynamic_resize_admin.tpl') );
+ 
+$template->assign('DEBUG_MODE', $me->my_config['DynamicResize']);
+//$template->assign('TESTPLUGIN_VAR2', $me->my_config['TestPlugin2']);
+ 
+$template->assign_var_from_handle( 'ADMIN_CONTENT', 'plugin_admin_content');
+?>
Index: /extensions/DynamicResize/admin/dynamic_resize_admin.tpl
===================================================================
--- /extensions/DynamicResize/admin/dynamic_resize_admin.tpl	(revision 12181)
+++ /extensions/DynamicResize/admin/dynamic_resize_admin.tpl	(revision 12181)
@@ -0,0 +1,21 @@
+<div class="titrePage">
+  <h2>Dynamic Resize</h2>
+</div>
+<p>
+Configuration de DynamicResize
+</p>
+<form method="post" action="{$DYNAMIC_RESIZE_F_ACTION}" class="general">
+<fieldset>
+	<legend>Dynamic Resize</legend>
+    <label>is Active
+	   <input type="text" name="DYNAMIC_RESIZE_ACTIVE" value="{$DYNAMIC_RESIZE_ACTIVE}" />
+    </label>
+    <br/>
+    <!--<label>Variable 2 du fichier de configuration
+	   <input type="text" name="TESTPLUGIN_VAR2" value="{$TESTPLUGIN_VAR2}" />
+    </label>
+-->
+</fieldset>
+ 
+<p><input type="submit" value="Enregistrer" name="submit" /></p>
+</form>
Index: /extensions/DynamicResize/admin/init.php
===================================================================
--- /extensions/DynamicResize/admin/init.php	(revision 12181)
+++ /extensions/DynamicResize/admin/init.php	(revision 12181)
@@ -0,0 +1,15 @@
+<?php
+add_event_handler('get_admin_plugin_menu_links', 'localfiles_admin_menu');
+function localfiles_admin_menu($menu)
+{
+  array_push(
+    $menu,
+    array(
+      'NAME' => 'LocalFiles Editor',
+      'URL' => get_root_url().'admin.php?page=plugin-'.basename(dirname(__FILE__))
+      )
+    );
+ 
+  return $menu;
+}
+?>
Index: /extensions/DynamicResize/pic/.htaccess
===================================================================
--- /extensions/DynamicResize/pic/.htaccess	(revision 12181)
+++ /extensions/DynamicResize/pic/.htaccess	(revision 12181)
@@ -0,0 +1,5 @@
+<IfModule mod_rewrite.c>
+RewriteEngine On
+RewriteRule . ../slir/index.php [L]
+</IfModule>
+
Index: /extensions/DynamicResize/scripts/xhrpic.js
===================================================================
--- /extensions/DynamicResize/scripts/xhrpic.js	(revision 12181)
+++ /extensions/DynamicResize/scripts/xhrpic.js	(revision 12181)
@@ -0,0 +1,80 @@
+if (!window.console) console = {};
+console.log = console.log || function(){};
+console.warn = console.warn || function(){};
+console.error = console.error || function(){};
+console.info = console.info || function(){};
+var fire_count=0;
+//http://4loc.wordpress.com/2009/04/28/documentready-vs-windowload/
+//jQuery(document).ready(function (jQuery) {
+//jQuery(window).load(function () {
+	jQuery("#ret_autosize").live("ON", function (e, a) {   
+		/*
+                a.width= largeur de l'image
+                a.height= hauteur de l'image
+                a.theImage=  l'objet image
+                a.src_img=  url de l'image
+                */
+	fire_count = fire_count+1;
+        if(dyn_mode=='FLOW' || dyn_mode=='FLOW0'){
+		console.log('info : returned by autosize are these a.width x a.height :'+a.width+'x'+a.height);
+ 		console.log('info : returned by autosize are these a.window_width x a.window_height :'+a.window_width+'x'+a.window_height);
+                
+		console.log('saving in cookie the actual size ('+a.window_width+'x'+a.window_height+') for next pic');	
+                jQuery.cookie("dynamic_width",  a.window_width);
+		jQuery.cookie("dynamic_height", a.window_height);
+	}else if(dyn_mode =='XHR'){
+		//trying to download actual picture
+	
+		if (typeof dyn_src_img == "undefined") {
+			console.error('var dyn_src_img is not defined !! please check template');
+		}else if(fire_count>1){
+			console.log('source not downloaded again');
+		}else{
+			console.log(dyn_src_img);
+			console.log("fire_count:"+fire_count);
+			//@todo: deal with alternative methods
+			dyn_src='/slir/w'+a.width+'-h'+a.height+'/'+dyn_src_img;
+			//dyn_src_img=dyn_src_img+'&dyn_width='+a.width+'&dyn_height='+a.height;
+			console.log('dyn_src_img:'+dyn_src_img);
+			a.theImage.src = dyn_src_img; 
+	        }
+	}
+    })
+  //})
+//})
+function fire_ret_autosize(){
+	jQuery("#ret_autosize").trigger("ON");
+}
+
+jQuery(document).ready(function (jQuery) {
+	jQuery(window).load(function () {
+	$("<div />").attr({
+                id: "prefetchContainer",
+        }).appendTo("#tabZone").css({ display: "none" });
+	
+	simpleLoad(next_dyn_url);
+
+	})
+})
+
+
+
+
+
+
+
+
+	
+  //simple image load
+function simpleLoad(fileName) {
+	$("<img />").attr({ 
+		id: "next_pic", 
+		src: fileName,
+		title: fileName
+	}).appendTo("#prefetchContainer").css({ display: "none" });			
+};
+
+	
+
+
+
Index: /extensions/DynamicResize/svn.externals
===================================================================
--- /extensions/DynamicResize/svn.externals	(revision 12181)
+++ /extensions/DynamicResize/svn.externals	(revision 12181)
@@ -0,0 +1,2 @@
+prim http://primage.googlecode.com/svn/trunk
+slir http://smart-lencioni-image-resizer.googlecode.com/svn/trunk 
