Index: /extensions/Autosize/admin/admin_autosize.php
===================================================================
--- /extensions/Autosize/admin/admin_autosize.php (revision 7911)
+++ /extensions/Autosize/admin/admin_autosize.php (revision 7912)
@@ -92,40 +92,5 @@
$path = AUTOSIZE_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'] ;
Index: /extensions/Autosize/admin/template/admin.tpl
===================================================================
--- /extensions/Autosize/admin/template/admin.tpl (revision 7911)
+++ /extensions/Autosize/admin/template/admin.tpl (revision 7912)
@@ -5,5 +5,5 @@
var thumbnail = '{$thumbnail}';
var theme = '{$theme}';
- var version = '{$version}';
+ var cl_version = '{$cl_version}';
var scaled_width = '{$SCALED_WIDTH}'; // valeur par defaut
var scaled_height = '{$SCALED_HEIGHT}'; // valeur par defaut
@@ -69,5 +69,5 @@
{/if}
-
{'Autosize'|translate} {'version'|translate}{$version}
+ {'Autosize'|translate} {'version'|translate}{$cl_version}
{'cl_autosize_Howto'|translate}
Index: /extensions/Autosize/autosize.inc.php
===================================================================
--- /extensions/Autosize/autosize.inc.php (revision 7911)
+++ /extensions/Autosize/autosize.inc.php (revision 7912)
@@ -134,30 +134,26 @@
static public function cl_autosize_script_3($content)
{
- global $template,$user,$conf,$picture ,$page,$cl_version, $cl_plugin ;
- //userDefManage ??
- $my_path = basename(dirname(__FILE__)).'/' ;
- $my_path = dirname(__FILE__).'/';
+ global $template,$user,$conf,$picture ,$page,$cl_plugin;
+ //userDefManage ??
+ $my_path = basename(dirname(__FILE__)).'/' ;
+ $my_path = dirname(__FILE__).'/';
$debug = isset($conf['debug']) ? $conf['debug'] : false ;
$cl_conflit = isset($conf['cl_conflit']) ? $conf['cl_conflit'] : 'true' ;
-$ThePicture = $template->get_template_vars('current');
-$tpl_name = $user['theme'] ;
-if ( !empty($content) ) { return $content; }
-if ($ThePicture['is_picture'] <> 1 ) { return $content; ; }
-
- $autosizejs = ''."\n";
- $template->append('head_elements',$autocss);
-
+ $ThePicture = $template->get_template_vars('current');
+ $tpl_name = $user['theme'] ;
+ if ( !empty($content) ) { return $content; }
+ if ($ThePicture['is_picture'] <> 1 ) { return $content; ; }
+
+ $autosizejs = ''."\n";
+ $template->append('head_elements',$autocss);
+
$autocss="";
-$template->append('footer_elements',"\n".$autocss);
-
-
-
+ $template->append('footer_elements',"\n".$autocss);
return $content ;
-
}// function cl_autosize_script_3
@@ -165,5 +161,5 @@
static public function cl_autosize_script_2()
{
- global $template,$user,$conf,$picture ,$page,$cl_version, $cl_plugin ;
+ global $template,$user,$conf,$picture ,$page, $cl_plugin ;
//userDefManage ??
$my_path = basename(dirname(__FILE__)).'/' ;
@@ -174,14 +170,14 @@
$template->assign(
array(
- 'cl_plugin' => $cl_version['id'] ,
- 'version' => $cl_version['version'] ,
+ 'cl_version' => $cl_plugin['version'] ,
+ 'name' => $cl_plugin['name'] ,
'ma_page' => $page['body_id'],
'cl_conflit' => $cl_conflit ,
'theme' => $theme ,
'DEBUG' => $debug ,
- 'AUTOSIZE_PATH' => AUTOSIZE_PATH)
+ 'AUTOSIZE_PATH' => AUTOSIZE_PATH
+ )
);
- global $cl_plugin;
-
+
$autoscript="";
$template->append('footer_elements',$autoscript);
- return ;
- $template->set_filenames(
- array('autosize_init'=>$my_path. "template/cl_conflit.tpl"
- )
- );
-if( $page['body_id'] == 'theAdminPage' ) return ;
-
- return $template->parse( 'autosize_init', false);
+ return ;
}// function cl_autosize_script_2
@@ -205,5 +194,5 @@
static public function cl_autosize_script()
{
- global $template,$user,$conf,$picture ,$page,$cl_version, $cl_plugin ;
+ global $template,$user,$conf,$picture ,$page, $cl_plugin ;
$my_path = basename(dirname(__FILE__)).'/' ;
$my_path = dirname(__FILE__).'/';
@@ -215,6 +204,6 @@
$template->assign(
array(
- 'cl_plugin' => $cl_version['id'] ,
- 'version' => $cl_version['version'] ,
+ 'cl_version' => $cl_plugin['version'] ,
+ 'name' => $cl_plugin['name'] ,
'cl_conflit' => $cl_conflit ,
'theme' => $theme ,
Index: /extensions/Autosize/include/affiche.php
===================================================================
--- /extensions/Autosize/include/affiche.php (revision 7911)
+++ /extensions/Autosize/include/affiche.php (revision 7912)
@@ -1,16 +1,16 @@
assign(
- array(
- 'version' => $version,
+ array(
+ 'cl_version' => $cl_version,
'cl_plugin' => $cl_plugin,
Index: /extensions/Autosize/include/constants.php
===================================================================
--- /extensions/Autosize/include/constants.php (revision 7911)
+++ /extensions/Autosize/include/constants.php (revision 7912)
@@ -2,3 +2,45 @@
global $prefixeTable;
if (!defined('CL_AUTOSIZE_TABLE')) define('CL_AUTOSIZE_TABLE', $prefixeTable.'cl_autosize');
+$path = AUTOSIZE_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/Autosize/js/conflit.js
===================================================================
--- /extensions/Autosize/js/conflit.js (revision 7911)
+++ /extensions/Autosize/js/conflit.js (revision 7912)
@@ -184,14 +184,7 @@
info_image = jQuery(Parent).infos();
- if (info_image.height==0) {
- Parent = "#theImageBox";
- }
-
-
p0 = jQuery(Parent);
-
- if (p0.length > 0) {
-
-
+ if (p0.length > 0) {
+
//======================================================
if (theme.match("gally", "gi"))
@@ -199,5 +192,5 @@
if (typeof (currentTab) == "undefined") inittoolbar();
else initializeImageMode("resize");
- };
+
if (info_image.position != "static") {
@@ -206,4 +199,5 @@
jQuery(Parent).css({ position: "static" } );
jQuery("#imageToolBar").css({ position: "relative", top: "0px" });
+ };
}
}
@@ -429,5 +423,5 @@
}
//window_1290934905697_top
- if (fn.match(RegExp("window_|WindowUtilities", "gi"))) {
+ if (fn.match(RegExp("window_..|WindowUtilities", "gi"))) {
states.push('rv_gmaps');
break;
@@ -583,5 +577,5 @@
function save_framework(page) {
try {
- Conflit = { version: Version, name: cl_plugin };
+ Conflit = { version: cl_version, name: cl_plugin };
} catch (e) {
Index: /extensions/Autosize/js/jquery.dimensions.js
===================================================================
--- /extensions/Autosize/js/jquery.dimensions.js (revision 7911)
+++ /extensions/Autosize/js/jquery.dimensions.js (revision 7912)
@@ -31,6 +31,7 @@
var torl = name == 'Height' ? 'Top' : 'Left',
borr = name == 'Height' ? 'Bottom' : 'Right';
- options = jQuery.extend({ margin: false },
- options || {});
+ options = options || false;
+ options = jQuery.extend({ margin: options } );
+
var val = this.is(':visible') ? this[0]['offset' + name] :
num(this,
@@ -39,5 +40,7 @@
num(this, 'border' + borr + 'Width') +
num(this, 'padding' + torl) +
- num(this, 'padding' + borr);
+ num(this, 'padding' + borr)
+
+ ;
return val + (options.margin ? (num(this, 'margin' + torl) + num(this, 'margin' + borr)) : 0);
};
Index: /extensions/Autosize/main.inc.php
===================================================================
--- /extensions/Autosize/main.inc.php (revision 7911)
+++ /extensions/Autosize/main.inc.php (revision 7912)
@@ -2,5 +2,5 @@
/*
Plugin Name: AutoSize
-Version: 1.0.0
+Version: 1.3.8.0
Description: Ajuste l'affichage des photos en fonction de la hauteur de la fenetre de navigation
Plugin URI: http://piwigo.org/ext/extension_view.php?eid=448
@@ -13,9 +13,7 @@
//=================================================================================
$path = AUTOSIZE_PATH;
-//==================================================================
- global $cl_version , $cl_plugin ;
- $cl_version = $plugin;
- $cl_plugin = $plugin;
-include_once(AUTOSIZE_PATH.'autosize.inc.php');
+//============================================================================
+ include($path."include/constants.php");
+ include_once(AUTOSIZE_PATH.'autosize.inc.php');
//==================================================================
$autosize_controler = new autosize_controler();
Index: /extensions/Autosize/template/autosize.tpl
===================================================================
--- /extensions/Autosize/template/autosize.tpl (revision 7911)
+++ /extensions/Autosize/template/autosize.tpl (revision 7912)
@@ -8,17 +8,7 @@
{/html_head}
+
+