Changeset 18925 for extensions/Autosize
- Timestamp:
- Nov 4, 2012, 12:03:50 PM (11 years ago)
- Location:
- extensions/Autosize
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/autosize.inc.php
r18823 r18925 58 58 echo "GET:" . cl_print_var($_GET) ; 59 59 echo "POST:" . cl_print_var($_POST) ; 60 die( );60 die("#60:" . $DEBUG_autosize); 61 61 } 62 62 $ma_page=isset($page['body_id'])?$page['body_id']:"" ; … … 74 74 if(!isset($_COOKIE['windowHeight'] )){ 75 75 self::reload(); 76 die( );76 die("#76" . $DEBUG_autosize); 77 77 } 78 78 … … 80 80 if (!isset($_COOKIE['autosize_reload']) ){ 81 81 self::reload(); 82 die( );82 die("#82 :" + $DEBUG_autosize); 83 83 84 84 } … … 138 138 //======================================================================= 139 139 $pictureSelType = pwg_get_session_var('picture_sel_type',$pictureSelType); 140 140 141 141 if(preg_match("|test|", $DEBUG_autosize, $val)) { 142 142 echo $infos_message ; … … 145 145 echo "GET:" . cl_print_var($_GET) ; 146 146 echo "POST:" . cl_print_var($_POST) ; 147 die( );147 die("#147: ".$DEBUG_autosize); 148 148 } 149 149 … … 183 183 $theImageHeight= $windowHeight - $theImageTop - $theImageMargeHeight ; 184 184 185 if ( $element_info['is_gvideo']){185 if (isset($element_info['is_gvideo']) && $element_info['is_gvideo'] ){ 186 186 $pictureDeriv=$default_size; 187 187 … … 228 228 if(preg_match("|c1|", $DEBUG_autosize, $val)) { 229 229 echo "<!-- " . $theImageWidth . "x" . $theImageHeight . " " .cl_print_var($content) ." -->"; 230 die( );230 die("#230: " . $DEBUG_autosize); 231 231 } 232 232 return $content; … … 315 315 316 316 317 die( $content);317 die("#317 : " . $content + $DEBUG_autosize); 318 318 $theImageHeight =abs($theImageHeight); 319 319 $theImageWidth =abs($theImageWidth); … … 444 444 ); 445 445 if( preg_match("|c2|", $DEBUG_autosize, $val) ){ 446 die( );446 die( "446: " . $DEBUG_autosize); 447 447 return $content ; 448 448 … … 588 588 } 589 589 if($pictureSelType == $pictureDeriv ) { 590 return ; 590 if(preg_match("|event|", $DEBUG_autosize, $val)) { cl_aff_infos_plus();} ; 591 // return ; 591 592 } 592 593 $template->set_filenames(array('autosize_content_header'=> $file )); … … 847 848 $std_image = (object) ''; 848 849 $default_image=(object) ''; 850 $SelType_image=(object) ''; 849 851 $last_image=(object) ''; 850 852 … … 877 879 } 878 880 if(preg_match("|get_minfos|", $DEBUG_autosize, $val)) 879 $infos_message .=$img_url . " -> " . $img_type ."<br >";881 $infos_message .=$img_url . " -> " . $img_type ."<br >"; 880 882 881 883 if(file_exists(PHPWG_ROOT_PATH.$img_url)){ } // if file … … 903 905 $mini_image= $img_select; 904 906 } 905 906 907 $liste_type[$img_type]=$img_type.",".$img_url.",".$imgWH[0] .",".$imgWH[1] ; 908 if( $img_type==$pictureSelType){ 909 if(preg_match("|get_minfos|", $DEBUG_autosize, $val)) $infos_message .= $pictureSelType . " <--> " . $img_type ."<br >"; 910 911 $SelType_image->type=$img_type; 912 $SelType_image->url=$img_url; 913 $SelType_image=$img_select; 914 } 907 915 if( $img_type=="Original" && $theImage_def==0 ){ 908 916 $theImage_def=1; … … 948 956 949 957 $retour=(object)'' ; 950 951 952 953 954 958 if ($pictureSelType=="Autosize") $retour= $maxi_image ; 955 959 else if ($pictureSelType=="SelMaxi") $retour= $mini_image ; 956 957 else $retour=$last_image ; 958 if (!isset( $retour->type)){ 959 $retour=$last_image; 960 $retour->type = $retour->get_type(); 961 $retour->url = $retour->get_path(); 962 } 963 964 if($nofile > 0){ 965 966 $set_miniature=$No_files ; 967 968 969 960 else{ 961 $types = array_intersect(array_keys($liste_type), array($pictureSelType)); 962 if(!count($types)){ 963 $pictureSelType="Original"; 970 964 } 971 972 973 if($retour->type=="Original") 974 $retour->type=$last_derivative ; 965 $retours= explode(",",$liste_type[$pictureSelType]); 966 $retour=$SelType_image; 967 $retour->type=$retours[0]; 968 $retour->url=$retours[1]; 969 } 970 971 972 if (!isset( $retour->type)){ 973 $retour=$last_image; 974 $retour->type = $retour->get_type(); 975 $retour->url = $retour->get_path(); 976 } 977 if (isset( $retour->type) && $retour->type=="Original" ){ 978 $retour=$last_image; 979 $retour->type = $last_derivative; 980 $retour->url = $retour->get_path(); 981 } 982 983 if(preg_match("|get_minfos|", $DEBUG_autosize, $val)) $infos_message .= $pictureSelType . " -> " . $retour->type . "---" . $retour->url. "<br >"; 984 985 if($nofile > 0){ 986 $set_miniature=$No_files ; 987 } 988 975 989 976 990 if(preg_match("|get_minfos|", $DEBUG_autosize, $val)) -
extensions/Autosize/js/Affiche_script.js
r18823 r18925 630 630 .error(function (e) { 631 631 if (!this.complete) { 632 src = jQuery(this).attr("src").replace("./_data/i/", "",1);632 src = jQuery(this).attr("src").replace("./_data/i/", "", 1); 633 633 jQuery.ajax({ 634 634 type: 'GET', 635 url: 'i.php?' + 635 url: 'i.php?' + src + "&ajaxload=true", 636 636 dataType: 'json', 637 637 success: (function (data) { … … 641 641 }); 642 642 643 643 644 644 645 645 } … … 648 648 .bind("Finish", function (e, data) { 649 649 if (typeof imageInfos_id == "undefined") return; 650 650 651 651 }) 652 652 .bind("ON", function (e, data) { … … 660 660 return; 661 661 } 662 if (data.src) { 663 if (typeof imageInfos_id == "undefined") return;664 if (data.src.match(RegExp(options.pictureDeriv.substr(0, 2) + ".jpg", "gi"))) { 665 // Autosize_resize(true, options);662 if (data.src) { 663 if (typeof imageInfos_id == "undefined") return; 664 if (data.src.match(RegExp(options.pictureDeriv.substr(0, 2) + ".jpg", "gi"))) { 665 // Autosize_resize(true, options); 666 666 } 667 667 } … … 965 965 //jQuery(theMainImage_id).height(Zone_image.image.height); 966 966 } else { 967 if (options.imageAutosize==false)968 if (options.pictureSelType == "Autosize" || options.pictureSelType == "SelMaxi") {969 jQuery(theMainImage_id).height(Zone_image.image.height);970 jQuery(theMainImage_id).width(Zone_image.image.width);971 972 } else {973 jQuery(theMainImage_id).height(Zone_image.image.height);974 jQuery(theMainImage_id).width(Zone_image.image.width);975 }967 if (options.imageAutosize == false) 968 if (options.pictureSelType == "Autosize" || options.pictureSelType == "SelMaxi") { 969 jQuery(theMainImage_id).height(Zone_image.image.height); 970 jQuery(theMainImage_id).width(Zone_image.image.width); 971 972 } else { 973 jQuery(theMainImage_id).height(Zone_image.image.height); 974 jQuery(theMainImage_id).width(Zone_image.image.width); 975 } 976 976 977 977 … … 1009 1009 url2 = this.src; 1010 1010 jQuery('#derivativeSwitchBox .switchCheck').css('visibility', 'hidden'); 1011 type = options.pictureSelType;1011 newtype = options.pictureSelType; 1012 1012 if (typeof type != "undefined" && (type == "Autosize" || type == "SelMaxi")) { 1013 1013 … … 1021 1021 options.pictureMap = typeMap; 1022 1022 options.pictureDeriv = typeSave; 1023 1024 1025 1023 document.cookie = 'picture_deriv=' + typeSave + ';path=' + COOKIE_PATH; 1026 1024 Autosize_resize(true, options); 1025 if (typeof type != "undefined" && (type == "Autosize" || type == "SelMaxi")) { 1026 1027 } else { 1028 jQuery("#bp_img_cla").attr("src", "./plugins/Autosize/icons/button-maximize.png"); 1029 jQuery("#bp_cla span").text(""); 1030 } 1027 1031 }) 1028 1032 .live("ON", function (e) { … … 2196 2200 2197 2201 2198 }); // ready2202 }); // ready 2199 2203 2200 2204 -
extensions/Autosize/main.inc.php
r18823 r18925 46 46 } 47 47 if(!preg_match("|NO|", $DEBUG_autosize, $val)) { 48 49 48 // init cl_autosize_script_1 cl_autosize_affiche 50 49 //Important avant pamooramics, gvideo 51 52 50 add_event_handler('render_element_content', array(&$autosize_ctrl, 'autosize_calcContent'),EVENT_HANDLER_PRIORITY_NEUTRAL-11,2); 53 54 51 /**/ 55 52 add_event_handler('render_element_content', array(&$autosize_ctrl,'init'),EVENT_HANDLER_PRIORITY_NEUTRAL-1,2 ); … … 62 59 } ; 63 60 64 65 61 62 66 63 67 64 ?>
Note: See TracChangeset
for help on using the changeset viewer.