Changeset 9864
- Timestamp:
- Mar 26, 2011, 3:29:27 PM (13 years ago)
- Location:
- trunk/admin
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/element_set_ranks.php
r9051 r9864 210 210 // template thumbnail initialization 211 211 $current_rank = 1; 212 212 $thumbnail_info=array(); 213 $clipping=array(); 213 214 while ($row = pwg_db_fetch_assoc($result)) 214 215 { 215 216 $src = get_thumbnail_url($row); 216 217 list($thumbnail_width, $thumbnail_height) = getimagesize($src); 218 $thumbnail_x_center = $thumbnail_width/2; 219 $thumbnail_y_center = $thumbnail_height/2; 220 217 218 $thumbnail_size = getimagesize($src); 219 $thumbnail_info[] = array( 220 'width' => $thumbnail_size[0], 221 'height' => $thumbnail_size[1], 222 'id' => $row['id'], 223 'tn_src' => $src, 224 'rank' => $current_rank * 10, 225 ); 226 $clipping[]= min($thumbnail_size[0]*0.75,$thumbnail_size[1]*0.75); 227 228 $current_rank++; 229 } 230 $clipping=array_sum($clipping)/count($clipping); 231 foreach ($thumbnail_info as $thumbnails_info) 232 { 233 $thumbnail_x_center = $thumbnails_info['width']/2; 234 $thumbnail_y_center = $thumbnails_info['height']/2; 221 235 $template->append( 222 236 'thumbnails', 223 237 array( 224 'ID' => $row['id'], 225 'TN_SRC' => $src, 226 'RANK' => $current_rank * 10, 227 'CLIP_TOP' => round($thumbnail_y_center - 96/2), 228 'CLIP_RIGHT' => round($thumbnail_x_center + 96/2), 229 'CLIP_BOTTOM' => round($thumbnail_y_center + 96/2), 230 'CLIP_LEFT' => round($thumbnail_x_center - 96/2) 238 'ID' => $thumbnails_info['id'], 239 'TN_SRC' => $thumbnails_info['tn_src'], 240 'RANK' => $thumbnails_info['rank'], 241 'CLIPING' => round($clipping), 242 'CLIPING_li' => round($clipping+8), 243 'CLIP_TOP' => round($thumbnail_y_center - $clipping/2), 244 'CLIP_RIGHT' => round($thumbnail_x_center + $clipping/2), 245 'CLIP_BOTTOM' => round($thumbnail_y_center + $clipping/2), 246 'CLIP_LEFT' => round($thumbnail_x_center - $clipping/2) 231 247 ) 232 248 ); 233 234 $current_rank++; 235 } 236 249 } 237 250 // image order management 238 251 $sort_fields = array( -
trunk/admin/themes/default/fix-ie7.css
r9348 r9864 3 3 #menubar { margin: 0; } 4 4 #footer { left: 0; } 5 6 UL.thumbnails li.rank-of-image { 7 text-align:left; 8 } -
trunk/admin/themes/default/template/element_set_ranks.tpl
r9586 r9864 44 44 <ul class="thumbnails"> 45 45 {foreach from=$thumbnails item=thumbnail} 46 <li class="rank-of-image" >47 <div class="clipwrapper" >46 <li class="rank-of-image" style="width:{$thumbnail.CLIPING_li}px; height:{$thumbnail.CLIPING_li}px; "> 47 <div class="clipwrapper" style="width:{$thumbnail.CLIPING}px; height:{$thumbnail.CLIPING}px; "> 48 48 <div class="clip" style="clip:rect({$thumbnail.CLIP_TOP}px {$thumbnail.CLIP_RIGHT}px {$thumbnail.CLIP_BOTTOM}px {$thumbnail.CLIP_LEFT}px);top:-{$thumbnail.CLIP_TOP}px;left:-{$thumbnail.CLIP_LEFT}px"> 49 49 <img src="{$thumbnail.TN_SRC}" class="thumbnail" alt=""> -
trunk/admin/themes/default/theme.css
r9815 r9864 55 55 width: 96px; 56 56 height: 96px; 57 margin: 3px; 57 58 } 58 59 .clip {
Note: See TracChangeset
for help on using the changeset viewer.