Changeset 16637
- Timestamp:
- Jul 12, 2012, 12:33:33 AM (12 years ago)
- Location:
- extensions/community
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/community/add_photos.php
r12616 r16637 193 193 ); 194 194 195 // the link on thumbnail must go to the websize photo 196 foreach ($page['thumbnails'] as $idx => $thumbnail) 197 { 198 $page['thumbnails'][$idx]['link'] = str_replace( 199 'thumbnail/'.$conf['prefix_thumbnail'], 200 '', 201 $thumbnail['src'] 195 // find the url to the medium size 196 $page['thumbnails'] = array(); 197 198 $query = ' 199 SELECT * 200 FROM '.IMAGES_TABLE.' 201 WHERE id IN ('.implode(',', $image_ids).') 202 ;'; 203 $result = pwg_query($query); 204 while ($row = pwg_db_fetch_assoc($result)) 205 { 206 $src_image = new SrcImage($row); 207 208 $page['thumbnails'][] = array( 209 'file' => $row['file'], 210 'src' => DerivativeImage::url(IMG_THUMB, $src_image), 211 'title' => $row['name'], 212 'link' => $image_url = DerivativeImage::url(IMG_MEDIUM, $src_image), 213 'lightbox' => true, 202 214 ); 203 215 } -
extensions/community/add_photos.tpl
r12616 r16637 377 377 <div> 378 378 {foreach from=$thumbnails item=thumbnail} 379 <a href="{$thumbnail.link}" class="externalLink">379 <a href="{$thumbnail.link}" class="{if isset($thumbnail.lightbox)}colorboxThumb{else}externalLink{/if}"> 380 380 <img src="{$thumbnail.src}" alt="{$thumbnail.file}" title="{$thumbnail.title}" class="thumbnail"> 381 381 </a> … … 523 523 524 524 </div> <!-- photosAddContent --> 525 526 {* Community specific *} 527 {footer_script}{literal} 528 jQuery(document).ready(function(){ 529 jQuery("a.colorboxThumb").colorbox({rel:"colorboxThumb"}); 530 531 jQuery("a.externalLink").click(function() { 532 window.open($(this).attr("href")); 533 return false; 534 }); 535 }); 536 {/literal}{/footer_script} -
extensions/community/admin_pendings.php
r9453 r16637 131 131 i.id, 132 132 path, 133 tn_ext,134 133 date_creation, 135 134 name, … … 141 140 width, 142 141 height, 143 has_high, 144 high_filesize, 142 rotation, 145 143 146 144 '.$conf['user_fields']['username'].' AS username … … 192 190 foreach ($rows as $row) 193 191 { 194 $thumb = get_thumbnail_url( 195 array( 196 'id' => $row['image_id'], 197 'path' => $row['path'], 198 'tn_ext' => @$row['tn_ext'] 199 ) 200 ); 201 192 $src_image = new SrcImage($row); 193 $thumb_url = DerivativeImage::url(IMG_THUMB, $src_image); 194 $medium_url = DerivativeImage::url(IMG_MEDIUM, $src_image); 195 202 196 // file properties 203 197 $dimensions = null; … … 231 225 'U_EDIT' => get_root_url().'admin.php?page=picture_modify&image_id='.$row['image_id'], 232 226 'ID' => $row['image_id'], 233 'TN_SRC' => $thumb ,234 ' WEBSIZE_SRC' => $row['path'],227 'TN_SRC' => $thumb_url, 228 'MEDIUM_SRC' => $medium_url, 235 229 'ADDED_BY' => $row['username'], 236 230 'ADDED_ON' => format_date($row['added_on'], true), 237 'NAME' => get_image_name($row['name'], $row['file']),231 'NAME' => $row['name'], 238 232 'DIMENSIONS' => $dimensions, 239 233 'FILE' => $row['file'], -
extensions/community/admin_pendings.tpl
r9372 r16637 1 {combine_script id='jquery.colorbox' load='footer' require='jquery' path='themes/default/js/plugins/jquery.colorbox.min.js'} 2 {combine_css path="themes/default/js/plugins/colorbox/style2/colorbox.css"} 3 1 4 {literal} 2 5 <style> … … 10 13 {literal} 11 14 <script type="text/javascript"> 12 $(document).ready(function(){ 15 jQuery(document).ready(function(){ 16 17 jQuery("a.zoom").colorbox({rel:"zoom"}); 13 18 14 19 function checkSelectedRows() { … … 78 83 <td> 79 84 <div class="comment"> 80 <p class="commentAction" style="float:left;margin:0.5em 0 0 0.5em"><a href="{$photo. WEBSIZE_SRC}" class="externalLink">{'Zoom'|@translate}</a> · <a href="{$photo.U_EDIT}" class="externalLink">{'Edit'|@translate}</a></p>85 <p class="commentAction" style="float:left;margin:0.5em 0 0 0.5em"><a href="{$photo.MEDIUM_SRC}" class="zoom">{'Zoom'|@translate}</a> · <a href="{$photo.U_EDIT}" class="externalLink">{'Edit'|@translate}</a></p> 81 86 <p class="commentHeader"><strong>{$photo.ADDED_BY}</strong> - <em>{$photo.ADDED_ON}</em></p> 82 87 <table> -
extensions/community/main.inc.php
r12333 r16637 119 119 } 120 120 121 add_event_handler('blockmanager_apply' , 'community_gallery_menu' );121 add_event_handler('blockmanager_apply' , 'community_gallery_menu', EVENT_HANDLER_PRIORITY_NEUTRAL+10); 122 122 function community_gallery_menu($menu_ref_arr) 123 123 {
Note: See TracChangeset
for help on using the changeset viewer.