plugins/gallery/viewimage.php
changeset 25 d9f37d2ea2cf
parent 24 7f3bd3030ae9
child 33 6dc190e2158b
equal deleted inserted replaced
24:7f3bd3030ae9 25:d9f37d2ea2cf
   279         $tag_return['note_id'] = $tag_id;
   279         $tag_return['note_id'] = $tag_id;
   280         $response = array($tag_return);
   280         $response = array($tag_return);
   281         
   281         
   282         break;
   282         break;
   283       case 'get_tags':
   283       case 'get_tags':
       
   284         if ( empty($row['img_tags']) )
       
   285         {
       
   286           $row['img_tags'] = '[]';
       
   287         }
   284         $response = snapr_json_decode($row['img_tags']);
   288         $response = snapr_json_decode($row['img_tags']);
   285         foreach ( $response as $key => $_ )
   289         foreach ( $response as $key => $_ )
   286         {
   290         {
   287           unset($_);
   291           unset($_);
   288           $tag = $response[$key];
   292           $tag = $response[$key];
   336   
   340   
   337   echo '<div style="text-align: center; margin: 10px auto; border: 1px solid #DDDDDD; padding: 7px 10px; display: table;">';
   341   echo '<div style="text-align: center; margin: 10px auto; border: 1px solid #DDDDDD; padding: 7px 10px; display: table;">';
   338   $img_url  = makeUrlNS('Special', 'GalleryFetcher/preview/' . $img_id);
   342   $img_url  = makeUrlNS('Special', 'GalleryFetcher/preview/' . $img_id);
   339   $img_href = makeUrlNS('Special', 'GalleryFetcher/full/' . $img_id);
   343   $img_href = makeUrlNS('Special', 'GalleryFetcher/full/' . $img_id);
   340   
   344   
       
   345   // The actual image
   341   $iehack = ( strstr(@$_SERVER['HTTP_USER_AGENT'], 'MSIE') ) ? ' style="width: 1px;"' : '';
   346   $iehack = ( strstr(@$_SERVER['HTTP_USER_AGENT'], 'MSIE') ) ? ' style="width: 1px;"' : '';
   342   echo '<div snapr:imgid="' . $img_id . '"' . $iehack . '><img alt="Image preview (640px max width)" src="' . $img_url . '" id="snapr_preview_img" style="border-width: 0; margin-bottom: 5px; display: block;" /></div>';
   347   echo '<div snapr:imgid="' . $img_id . '"' . $iehack . '><img onload="snapr_lock_onload_img = false; snapr_tags_onload_real();" alt="Image preview (640px max width)" src="' . $img_url . '" id="snapr_preview_img" style="border-width: 0; margin-bottom: 5px; display: block;" /></div>';
   343   
   348   
   344   echo '<table border="0" width="100%"><tr><td style="text-align: left; width: 24px;">';
   349   echo '<table border="0" width="100%"><tr><td style="text-align: left; width: 24px;">';
   345   
   350   
   346   // Prev button
   351   // Prev button
   347   if ( $prev )
   352   if ( $prev )