Changeset 5957 for trunk/admin/thumbnail.php
- Timestamp:
- Apr 25, 2010, 12:22:32 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/thumbnail.php
r5920 r5957 33 33 // be smaller than original picture !) in the sub directory named 34 34 // "thumbnail". 35 function RatioResizeImg($ path, $newWidth, $newHeight, $tn_ext)35 function RatioResizeImg($info, $path, $newWidth, $newHeight, $tn_ext) 36 36 { 37 37 global $conf, $lang, $page; 38 39 if ($info !== false) 40 { 41 //someone hooked us - so we skip 42 return $info; 43 } 38 44 39 45 if (!function_exists('gd_info')) … … 158 164 } 159 165 166 // add default event handler for thumbnail resize 167 add_event_handler('thumbnail_resize', 'RatioResizeImg', EVENT_HANDLER_PRIORITY_NEUTRAL, 5); 168 160 169 // +-----------------------------------------------------------------------+ 161 170 // | template initialization | … … 252 261 253 262 $starttime = get_moment(); 254 if ($info = RatioResizeImg($path,$_POST['width'],$_POST['height'],'jpg')) 263 if ($info = trigger_event('thumbnail_resize', 264 false, 265 $path, 266 $_POST['width'], 267 $_POST['height'], 268 'jpg' 269 ) 270 ) 255 271 { 256 272 $endtime = get_moment();
Note: See TracChangeset
for help on using the changeset viewer.