Changeset 7943 for extensions/Autosize
- Timestamp:
- Nov 30, 2010, 9:01:46 AM (14 years ago)
- Location:
- extensions/Autosize
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/autosize.inc.php
r7912 r7943 43 43 if (isset( $page['body_id']) ) { 44 44 if ( $page['body_id']=='thePicturePage' ) { 45 if ( isset($picture['current'])){ 46 45 if ( isset($picture['current'])){ 47 46 $autosize_parametres = cl_autosize_Get_Options(); 48 47 include (AUTOSIZE_PATH."include/affiche.php"); … … 139 138 $my_path = dirname(__FILE__).'/'; 140 139 $debug = isset($conf['debug']) ? $conf['debug'] : false ; 141 $cl_conflit = isset($conf['cl_conflit']) ? $conf['cl_conflit'] : 'true' ; 142 140 143 141 $ThePicture = $template->get_template_vars('current'); 144 142 $tpl_name = $user['theme'] ; … … 162 160 { 163 161 global $template,$user,$conf,$picture ,$page, $cl_plugin ; 164 //userDefManage ??162 165 163 $my_path = basename(dirname(__FILE__)).'/' ; 166 164 $my_path = dirname(__FILE__).'/'; 167 165 $debug = isset($conf['debug']) ? $conf['debug'] : false ; 168 $cl_conflit = isset($conf['cl_conflit']) ? $conf['cl_conflit'] : 'true' ;166 169 167 $theme=$user['theme']; 170 168 $template->assign( … … 173 171 'name' => $cl_plugin['name'] , 174 172 'ma_page' => $page['body_id'], 175 'cl_conflit' => $cl_conflit ,173 176 174 'theme' => $theme , 177 175 'DEBUG' => $debug , … … 182 180 $autoscript="<script type='text/javascript'> 183 181 if (typeof (save_framework) == 'function') 184 save_framework('".$page['body_id']."');182 save_framework('".$page['body_id']."'); 185 183 </script>"; 186 184 $template->append('footer_elements',$autoscript); … … 199 197 $template->set_filenames(array('autosize_init'=>$my_path. "template/conflit.tpl" ) ); 200 198 $debug = isset($conf['debug']) ? $conf['debug'] : false ; 201 $cl_conflit = isset($conf['cl_conflit']) ? $conf['cl_conflit'] : 'true' ;199 202 200 $theme=$user['theme']; 203 201 … … 206 204 'cl_version' => $cl_plugin['version'] , 207 205 'name' => $cl_plugin['name'] , 208 'cl_conflit' => $cl_conflit ,206 209 207 'theme' => $theme , 210 208 'DEBUG' => $debug , … … 220 218 */ 221 219 static public function cl_ajuste_data($content){ 222 223 224 225 220 global $template,$user,$conf,$picture ; 221 $my_path = realpath(AUTOSIZE_PATH .'/'); 222 $userdata=$user; 223 $fields = array( 'maxwidth', 'maxheight' ); 226 224 227 $ThePicture = $template->get_template_vars('current'); 228 $data = array(); 229 230 231 225 $ThePicture = $template->get_template_vars('current'); 226 $data = array(); 232 227 return $content; 233 228 234 235 $data['maxheight'] ='250';236 237 238 239 240 241 242 243 229 $data['maxwidth'] = '1200'; 230 $data['maxheight'] ='250'; 231 $data['user_id'] = $userdata['id']; 232 foreach ($fields as $field) 233 { 234 if (isset($_POST[$field])) 235 { 236 $data[$field] = $_POST[$field]; 237 } 238 } 244 239 245 240 if($data['maxwidth'] != "" ) 246 { 247 $picture['current']['scaled_width']=$data['maxwidth']; 248 $picture['current']['scaled_height']=$data['maxheight']; 249 mass_updates(USER_INFOS_TABLE, 250 array('primary' => array('user_id'), 'update' => $fields), 251 array($data)); 252 253 } 254 255 256 return $content; 257 /* 258 $template->assign( 259 array( 260 'AUTOSIZE_PATH' => $my_path, 261 ) 262 ); 263 264 $template->parse( 'autosize_cl_init', false); 265 return $content; 266 */ 267 268 241 { 242 $picture['current']['scaled_width']=$data['maxwidth']; 243 $picture['current']['scaled_height']=$data['maxheight']; 244 mass_updates(USER_INFOS_TABLE, 245 array('primary' => array('user_id'), 'update' => $fields), 246 array($data)); 247 } 248 249 return $content; 269 250 } 270 251 -
extensions/Autosize/js/Affiche_script.js
r7934 r7943 390 390 391 391 //========================================================= 392 img_reelle.height = img_height 392 img_reelle.height = img_height; 393 393 img_reelle.width = Zone_Affichage.width; 394 394 … … 665 665 666 666 //================ Zone affichage ========================= 667 // Image_height, Image_width = valeur a atteindre.667 668 668 if (theme.match(RegExp("luciano", "g"))) { 669 669 //---- information en dehors du cadre 670 // Zone_Affichage.height -= Bandeau_bas.height - 20;671 670 jQuery(Cadre).height(Zone_Affichage.height -= Bandeau_bas.height); 672 673 671 } 674 672 … … 877 875 jQuery("#Debug5").css({ background: "transparent", 878 876 border: "red solid 2px", 879 877 top: info_frame.top + "px", 880 878 left: info_frame.left + "px", 881 879 width: info_frame.width + "px", -
extensions/Autosize/js/conflit.js
r7931 r7943 119 119 120 120 } else if (retour.match(RegExp("luciano", "gi"))) { 121 $1 = $_;121 122 122 123 123 ret_element = jQuery().$Luciano(element, nc); … … 417 417 } 418 418 //====================== 419 //? bubble 420 Expression = new RegExp("\\$", "gi") 421 if (fn.match(Expression)) { 422 if (fn.match(RegExp("rateForm", "gi"))) { 423 424 states.push('Luciano'); 425 break; 426 } 427 } 428 // "window.fireEvent('domready')" 429 Expression = new RegExp("window.fireEvent", "gi") 430 if (fn.match(Expression)) { //luciano 431 // "window.fireEvent('domready')" 432 Expression = new RegExp("window.fireEvent..domready..", "gi") 433 if (fn.match(Expression)) { 434 states.push('Luciano'); 435 break; 436 } 437 } 438 if (fn.match(RegExp("(splat|buildFrameWork|photoNext)", "gi"))) { //luciano 439 440 states.push('Luciano'); 441 break; 442 } 443 //====================== 419 444 if (fn.match(RegExp("_footer|ie_ready|makeDraggable|droppables", "gi"))) { 420 445 … … 444 469 break; 445 470 } 446 //? bubble 447 Expression = new RegExp("\\$", "gi") 448 if (fn.match(Expression)) { 449 if (fn.match(RegExp("rateForm", "gi"))) { 450 451 states.push('Luciano'); 452 break; 453 } 454 } 455 // "window.fireEvent('domready')" 456 Expression = new RegExp("window.fireEvent", "gi") 457 if (fn.match(Expression)) { //luciano 458 // "window.fireEvent('domready')" 459 Expression = new RegExp("window.fireEvent..domready..", "gi") 460 if (fn.match(Expression)) { 461 states.push('Luciano'); 462 break; 463 } 464 } 465 if (fn.match(RegExp("(splat|buildFrameWork|photoNext)", "gi"))) { //luciano 466 467 states.push('Luciano'); 468 break; 469 } 471 470 472 471 473 if (all_functions.length > 50) … … 555 557 })(jQuery); 556 558 557 559 560 561 $_0= $; 558 562 function $(element, nc0) { 559 563 a = conflit(element, nc0); … … 583 587 } 584 588 } 589 590 585 591 $_ = $; 586 592 function save_framework(page) { … … 591 597 } 592 598 593 $_ = $;599 $_2 = $; 594 600 return 595 601 -
extensions/Autosize/main.inc.php
r7934 r7943 2 2 /* 3 3 Plugin Name: AutoSize 4 Version: 1.3.9. 44 Version: 1.3.9.5 5 5 Description: Ajuste l'affichage des photos en fonction de la hauteur de la fenetre de navigation 6 6 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=448 -
extensions/Autosize/template/conflit.tpl
r7912 r7943 3 3 {known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js" now=1} 4 4 {known_script id="dimensions" src=$AUTOSIZE_PATH|@cat:"js/jquery.dimensions.js"} 5 {if $cl_conflit == 'true'} 6 {known_script id="conflit_script" src=$AUTOSIZE_PATH|@cat:"js/conflit.js"} 7 {/if} 5 {known_script id="conflit_script" src=$AUTOSIZE_PATH|@cat:"js/conflit.js"} 6 8 7 9 8
Note: See TracChangeset
for help on using the changeset viewer.