Changeset 18725 for extensions/Autosize/autosize.inc.php
- Timestamp:
- Oct 23, 2012, 3:04:22 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/autosize.inc.php
r18723 r18725 91 91 *********************/ 92 92 static public function init($content,$element_info){ 93 94 95 93 global $template,$version,$icon_path,$page,$picture,$conf; 96 94 global $user,$Css,$css_slideshow,$css_display,$liste_type; … … 176 174 if($has_pamoorama=="true"){ 177 175 if($DEBUG_autosize == "c1") echo $theImageWidth . "x" . $theImageHeight ; 178 179 $pattern[0] = '/width\:(.*)(\d+),/';$replacement[0] = 'width: '.$theImageWidth.' ,'; 180 176 $pattern[0] = '/width\:(.*)(\d+),/';$replacement[0] = 'width: '.$theImageWidth.' ,'; 181 177 if(($theImageWidth!=0)){ 182 178 $content= preg_replace($pattern, $replacement, $content); … … 188 184 return $content; 189 185 } 190 186 if(isset($_GET['map'])){ 187 return $content; 188 } 191 189 $pattern[0] = '/width\:(.*)(\d+)px/';$replacement[0] = 'width:100% '; 192 190 $pattern[1] = '/height\:(.*)(\d+)px/';$replacement[1] = 'height:100% '; … … 195 193 196 194 if ( preg_match("|charlie|", $content, $val) ){ 197 198 199 195 $ncount=1; 200 196 $content=str_replace( "<object" , "<object id='theMainImage' name='theMainImage' " ,$content,$ncount); 201 197 $content=str_replace( "<embed" , "<embed id='theMainImage' name='theMainImage' " ,$content,$ncount); 202 198 $content= preg_replace($pattern, "", $content); 203 204 199 $content= "<div id='theMainImage' style='height:".$theImageHeight."px ;width:".$theImageWidth."px' >". $content . "<img src='".AUTOSIZE_PATH . "images/transparent.gif' /></div>"; 205 200 $content= "<style>#theImageAndInfos{height:auto;width:auto;border:1px solid red;position:relative} 206 201 #theImage{height:auto;border:1px solid blue;align:center;text-align:center;width:100%;position:relative} 207 #theMainImage{height:auto;border:10px solid blue;align:center;text-align:center;position:static} 208 209 202 #theMainImage{height:auto;border:10px solid blue;align:center;text-align:center;position:static} 210 203 </style>".$content; 211 212 213 204 return $content; 214 205 } 215 206 216 207 $content= preg_replace($pattern, "", $content); 217 208 return $content; 218 209 }//INIT 219 210
Note: See TracChangeset
for help on using the changeset viewer.