Index: /extensions/imgpreview/css/imgpreview.css
===================================================================
--- /extensions/imgpreview/css/imgpreview.css	(revision 11085)
+++ /extensions/imgpreview/css/imgpreview.css	(revision 11086)
@@ -8,2 +8,6 @@
     z-index: 900;
 }
+#tooltip img {
+	max-height:600px;
+	max-width:600px;
+}
Index: /extensions/imgpreview/css_js.tpl
===================================================================
--- /extensions/imgpreview/css_js.tpl	(revision 11085)
+++ /extensions/imgpreview/css_js.tpl	(revision 11086)
@@ -2,2 +2,16 @@
 {combine_script id='imgpreview.init' load='footer' require='jquery.imgpreview' path='plugins/imgpreview/js/init.js'}
 {combine_css path="plugins/imgpreview/css/imgpreview.css"}
+{if isset($imgpreview)}
+{html_head}
+{literal}
+<style>
+#tooltip img {
+{/literal}
+	max-height: {$imgpreview.height}px;
+	max-width: {$imgpreview.width}px;
+{literal}
+}
+</style>
+{/literal}{/html_head}
+{/if}
+
Index: /extensions/imgpreview/js/init.js
===================================================================
--- /extensions/imgpreview/js/init.js	(revision 11085)
+++ /extensions/imgpreview/js/init.js	(revision 11086)
@@ -2,6 +2,6 @@
 (function($) {
    previewBoxId = 'tooltip';
-   if ($('.thumbnails a').length > 0 ) {
-      $('.thumbnails a').imgPreview({
+   if ($('.thumbnails a, #thumbnails a').length > 0 ) {
+      $('.thumbnails a, #thumbnails a').imgPreview({
          containerID:previewBoxId,
          considerBorders:'true',
Index: /extensions/imgpreview/language/en_UK/description.txt
===================================================================
--- /extensions/imgpreview/language/en_UK/description.txt	(revision 11086)
+++ /extensions/imgpreview/language/en_UK/description.txt	(revision 11086)
@@ -0,0 +1,1 @@
+This plugin enable a preview when the mouse in over a thumbnail.
Index: /extensions/imgpreview/language/en_UK/index.php
===================================================================
--- /extensions/imgpreview/language/en_UK/index.php	(revision 11086)
+++ /extensions/imgpreview/language/en_UK/index.php	(revision 11086)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
+// | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
+// | last modifier : $Author: rub $
+// | revision      : $Revision: 1912 $
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/imgpreview/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/imgpreview/language/en_UK/plugin.lang.php	(revision 11086)
+++ /extensions/imgpreview/language/en_UK/plugin.lang.php	(revision 11086)
@@ -0,0 +1,22 @@
+<?php
+$lang['imgp_max_width'] = 'maximum width of the picture';
+$lang['imgp_max_height'] = 'maximum height of the picture';
+$lang['imgp_send'] = 'Submit !';
+
+$lang['imgp_conf_updated'] = 'The config has been updated';
+
+
+
+$lang['imgp_howitworks'] = 'use : 
+ * imgPreview jQuery plugin<br>
+ * Copyright (c) 2009 James Padolsey<br>
+ * j@qd9.co.uk | http://james.padolsey.com<br>
+ * Dual licensed under MIT and GPL.<br>
+ * Updated: 09/02/09<br>
+ * @author James Padolsey<br>
+ * @version 0.22<br>
+';
+
+
+
+?>
Index: /extensions/imgpreview/language/fr_FR/description.txt
===================================================================
--- /extensions/imgpreview/language/fr_FR/description.txt	(revision 11086)
+++ /extensions/imgpreview/language/fr_FR/description.txt	(revision 11086)
@@ -0,0 +1,1 @@
+Ce plugin permet d'avoir un aperçu de l'image au survol de la miniature.
Index: /extensions/imgpreview/language/fr_FR/index.php
===================================================================
--- /extensions/imgpreview/language/fr_FR/index.php	(revision 11086)
+++ /extensions/imgpreview/language/fr_FR/index.php	(revision 11086)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
+// | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
+// | last modifier : $Author: rub $
+// | revision      : $Revision: 1912 $
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/imgpreview/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/imgpreview/language/fr_FR/plugin.lang.php	(revision 11086)
+++ /extensions/imgpreview/language/fr_FR/plugin.lang.php	(revision 11086)
@@ -0,0 +1,22 @@
+<?php
+$lang['imgp_max_width'] = 'largeur maximum de l\'image';
+$lang['imgp_max_height'] = 'hauteur maximum de l\'image';
+$lang['imgp_send'] = 'Envoyer !';
+
+$lang['imgp_conf_updated'] = 'La config a été mise à jour';
+
+
+
+$lang['imgp_howitworks'] = 'utilise :<br>
+ * imgPreview jQuery plugin <br>
+ * Copyright (c) 2009 James Padolsey<br>
+ * j@qd9.co.uk | http://james.padolsey.com<br>
+ * Dual licensed under MIT and GPL.<br>
+ * Updated: 09/02/09<br>
+ * @author James Padolsey<br>
+ * @version 0.22<br>
+';
+
+
+
+?>
Index: /extensions/imgpreview/language/index.php
===================================================================
--- /extensions/imgpreview/language/index.php	(revision 11086)
+++ /extensions/imgpreview/language/index.php	(revision 11086)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
+// | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
+// | last modifier : $Author: rub $
+// | revision      : $Revision: 1912 $
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/imgpreview/main.inc.php
===================================================================
--- /extensions/imgpreview/main.inc.php	(revision 11085)
+++ /extensions/imgpreview/main.inc.php	(revision 11086)
@@ -4,39 +4,43 @@
 Version: auto
 Description: give an image preview when the mouve is over a thumbnail
-Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=
+Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=551
 Author: Flop25
 Author URI: http://www.planete-flop.fr/
 */
-
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+define('IMGP_DIR' , basename(dirname(__FILE__)));
+define('IMGP_PATH' , PHPWG_PLUGINS_PATH . IMGP_DIR . '/');
+add_event_handler('get_admin_plugin_menu_links', 'imgpreview_lien_menu');
+function imgpreview_lien_menu($menu)
+{
+	
+    array_push(
+			$menu,
+			array('NAME' => 'Image Preview',
+            'URL'  => get_admin_plugin_menu_link(get_root_url().'plugins/'.IMGP_DIR.'/admin/admin.php')
+						)
+		);
+    return $menu;
+}
 /** thumbnails.tpl **/
 add_event_handler('loc_end_index_thumbnails', 'imgpreview_thumbnails');
 function imgpreview_thumbnails($tpl_thumbnails_var)
 {
-	global $template;
+	global $template, $conf ;
+
+	$conf_imgp = explode("#" , $conf['imgpreview']);
+	$imgpreview=array( 'width' => $conf_imgp[0], 'height' => $conf_imgp[1] );
+	$template->assign(array(
+		'imgpreview' => $imgpreview
+	));
+
 	$template->set_prefilter('index_thumbnails', 'imgpreview_prefilter_thumbnails');
 	$template->set_prefilter('stuffs', 'imgpreview_prefilter_thumbnails');
-	/*
-	$UrlJs = get_root_url().'plugins/imgpreview/js/imgpreview.js';
-	$UrlCss = get_root_url().'plugins/imgpreview/css/imgpreview.css';
-	$template->append(
-	'head_elements',
-	'<script type="text/javascript" src="'.$UrlJs.'"></script>'."\n".
-	"\t".'<link rel="stylesheet" type="text/css" href="'.$UrlCss.'">'."\n"
-	);
-	$template->append(
-	'footer_elements',
-	'<script type="text/javascript" src="'.get_root_url().'plugins/imgpreview/js/init.js"></script>'."\n"
-	);
-	*/
 	$dir=dirname(__FILE__).'/css_js.tpl';
 	$template->set_filenames(array(
 		'imgpreview_css_js' => realpath($dir),
 	  )  );
-	//die('_'.realpath($dir).'_');
-	//$imgpreview_css_js = $template->parse('imgpreview_css_js', true);
 	$template->assign_var_from_handle('IMGPREVIEW', 'imgpreview_css_js');
 
-	//define('IMGPREVIEW',$imgpreview_css_js);
-	//die(IMGPREVIEW);
 	return $tpl_thumbnails_var;
 }
Index: /extensions/imgpreview/maintain.inc.php
===================================================================
--- /extensions/imgpreview/maintain.inc.php	(revision 11086)
+++ /extensions/imgpreview/maintain.inc.php	(revision 11086)
@@ -0,0 +1,31 @@
+<?php
+
+function plugin_install()
+{
+    global $prefixeTable;
+    $q = '
+INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment)
+	VALUES
+	("imgpreview" , "" , "max-width#max-height");';
+    pwg_query($q);
+
+}
+
+
+
+function plugin_activate()
+{
+    global $prefixeTable;
+}//fin active
+
+
+
+
+function plugin_uninstall()
+{
+	global $prefixeTable;
+  pwg_query('DELETE FROM '.CONFIG_TABLE.' WHERE param IN (\'imgpreview\')');
+}//fin uninstall
+
+
+?>
