Ignore:
Timestamp:
Jul 12, 2012, 12:33:33 AM (12 years ago)
Author:
plg
Message:

Compatibility with Piwigo 2.4

Better "zoom" feature on gallery side and admin side

Bug fixed: the "Upload Photos" link in menubar is hidden when Advanced Menu Manager is activated.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/community/add_photos.php

    r12616 r16637  
    193193      );
    194194
    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 = '
     199SELECT *
     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,
    202214        );
    203215    }
Note: See TracChangeset for help on using the changeset viewer.