Changeset 18949 for extensions/Autosize/autosize.inc.php
- Timestamp:
- Nov 6, 2012, 3:30:32 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/autosize.inc.php
r18936 r18949 91 91 $imgSizeWH = $derivative->get_size(); 92 92 $SRC_IMG = $derivative->get_url(); 93 93 94 $picture['current']['scaled_width']=$imgSizeWH[0]; 94 95 $picture['current']['scaled_height']= $imgSizeWH[1]; 95 96 $picture['current']['high_url']= $SRC_IMG; 96 97 $picture['current']['image_url']=$SRC_IMG; 98 $picture['current']['thumbnail']=$SRC_IMG; 99 97 100 //============================================================== 98 101 $autosize_parametres = cl_autosize_Get_Options(); … … 240 243 $pattern[3] = '/height=\"(\d+)\"/';$replacement[3] = ' '; 241 244 242 if ( preg_match("|charlie|", $content, $val) ){ 245 if ( strstr( $content,"iframe")||strstr($content,"charlie" )){ 246 247 $pictureSelType="Autosize"; 248 $pictureDeriv=$conf['derivative_default_size']; 249 250 $_COOKIE['picture_sel_type']=$pictureSelType; 251 $_COOKIE['picture_deriv']=$pictureDeriv; 252 243 253 $ncount=1; 244 $content=str_replace( "<object" , "<object id='theMainImage_obj' name='theMainImage' " ,$content,$ncount); 245 $content=str_replace( "<embed" , "<embed id='theMainImage_emb' name='theMainImage' " ,$content,$ncount); 254 if (strstr($content,"charlie" )){ 255 $content=str_replace( "<object" , "<object id='theMainImage_obj' name='theMainImage' " ,$content,$ncount); 256 $content=str_replace( "<embed" , "<embed id='theMainImage_emb' name='theMainImage' " ,$content,$ncount); 257 $content=str_replace( 'id="video"',"id='theMainImage_obj' name='theMainImage' " ,$content,$ncount); 258 }else{ 259 $content=str_replace( "<iframe" , "<iframe id='iframe' name='theMainImage' " ,$content,$ncount); 260 } 246 261 $content= preg_replace($pattern, "", $content); 247 $content= "<div id='theMainImage' style='height:".$theImageHeight."px ;width:".$theImageWidth."px' >". $content . "<img src='".AUTOSIZE_PATH . "images/transparent.gif' /></div>"; 262 263 $content= "<div id='theMainImage' style='height:".$theImageHeight."px ;width:".$theImageWidth."px '>". $content . "<img src='".AUTOSIZE_PATH . "images/transparent.gif' /></div>"; 248 264 $content= "<style>#theImageAndInfos{height:auto;width:auto;position:relative} 249 265 #theImage{height:auto;align:center;text-align:center;width:100%;position:relative} 250 #theMainImage{height:auto;align:center;text-align:center;position:static} 266 #theMainImage{height:auto;align:center;text-align:center;position:static} 267 #charlie{display:none } 268 #iframe{display:none } 251 269 </style>".$content; 252 270 return $content; … … 591 609 // return ; 592 610 } 611 if (defined('GMAPS_VERSION')) $gmaps_function="true"; 612 else $gmaps_function="false" ; 613 593 614 $template->set_filenames(array('autosize_content_header'=> $file )); 594 615 $template->assign( array( AUTOSIZE_PATH,$AUTOSIZE_PATH, 595 616 'file_css' =>$file_css, 596 617 'css_display' => $css_display, 597 'theme' =>$theme 618 'theme' =>$theme, 619 'gmaps_function' => $gmaps_function 598 620 )); 599 621 $template->concat('autosize_content', $template->parse('autosize_content_header', true));
Note: See TracChangeset
for help on using the changeset viewer.