plugins/gallery/viewimage.php
changeset 25 d9f37d2ea2cf
parent 24 7f3bd3030ae9
child 33 6dc190e2158b
--- a/plugins/gallery/viewimage.php	Sun Feb 17 15:21:47 2008 -0500
+++ b/plugins/gallery/viewimage.php	Sat Feb 23 16:02:15 2008 -0500
@@ -281,6 +281,10 @@
         
         break;
       case 'get_tags':
+        if ( empty($row['img_tags']) )
+        {
+          $row['img_tags'] = '[]';
+        }
         $response = snapr_json_decode($row['img_tags']);
         foreach ( $response as $key => $_ )
         {
@@ -338,8 +342,9 @@
   $img_url  = makeUrlNS('Special', 'GalleryFetcher/preview/' . $img_id);
   $img_href = makeUrlNS('Special', 'GalleryFetcher/full/' . $img_id);
   
+  // The actual image
   $iehack = ( strstr(@$_SERVER['HTTP_USER_AGENT'], 'MSIE') ) ? ' style="width: 1px;"' : '';
-  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>';
+  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>';
   
   echo '<table border="0" width="100%"><tr><td style="text-align: left; width: 24px;">';