Hi,
I just d/l V1.3, which I am now planning to use for a client's website. One of the major wins was the batch upload. I have some ideas for this that I'll get into later. For now, I have two patches that folks might find useful. (I hope this displays correctly inside this forum)
1. The search didn't find text in the short description, which in my case was all there was, as we only have test images up!! So, in line 868 of index.php, I changed the where clause to search both description fields:
$where .= " t1.description LIKE '%$query_array[$i]%'";
to:
$where .= " (t1.description LIKE '%$query_array[$i]%' OR t1.short_description LIKE '%$query_array[$i]%')";
I suppose this could be a switch, but this is sufficient for me.
2. For our application the thumbnail page was too busy with all the picture data, so I added a new variable to gallery_config.php:
/* Show details of thumbnails */
$gal_show_picture_data = FALSE;
It is now inside an if clause:
if ($gal_show_picture_data) {
$content .= "<td class=\"$gal_td4\" width=\"125\" valign=\"top\"><div align=\"center\"><a href=\"mod.php?mod=gallery&op=media&media_id=$row[id]\"><img src=\"$gal_url/media/thumbnails/$row[id].$row[thumbnail_extension]\" alt=\"$row[title]\" border=\"$gal_pictborder\" /></a></div><span class=\"$gal_smalltext\"><b>$tran[Title]:</b> $row[title]<br /><b>$tran[Date]:</b> " .date($gal_time_format, $row[timestamp]). "<br /><b>$tran[file_size]:</b> $row[filesize] $tran[KB]<br /><b>$tran[Description]:</b> $row[short_description] <a href=\"mod.php?mod=gallery&op=media&media_id=$row[id]\">$tran[more]...</a></span></td>";
} else {
$content .= "<td class=\"$gal_td4\" width=\"125\" valign=\"top\"><div align=\"center\"><a href=\"mod.php?mod=gallery&op=media&media_id=$row[id]\"><img src=\"$gal_url/media/thumbnails/$row[id].$row[thumbnail_extension]\" alt=\"$row[title]\" border=\"$gal_pictborder\" /></a></div><span class=\"$gal_smalltext\"><a href=\"mod.php?mod=gallery&op=media&media_id=$row[id]\">$row[title] ($row[filesize] $tran[KB])</a><br/>$row[short_description]</span></td>";
}
The "else" portion has a shortened info section, with just the title and size. I'm still messing with it so this isn't the final result, but I thought it might be interesting/useful.
Thanks to all!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I just d/l V1.3, which I am now planning to use for a client's website. One of the major wins was the batch upload. I have some ideas for this that I'll get into later. For now, I have two patches that folks might find useful. (I hope this displays correctly inside this forum)
1. The search didn't find text in the short description, which in my case was all there was, as we only have test images up!! So, in line 868 of index.php, I changed the where clause to search both description fields:
$where .= " t1.description LIKE '%$query_array[$i]%'";
to:
$where .= " (t1.description LIKE '%$query_array[$i]%' OR t1.short_description LIKE '%$query_array[$i]%')";
I suppose this could be a switch, but this is sufficient for me.
2. For our application the thumbnail page was too busy with all the picture data, so I added a new variable to gallery_config.php:
/* Show details of thumbnails */
$gal_show_picture_data = FALSE;
and changed line 748, the $content.= line:
$content .= "<td class=\"$gal_td4\" width=\"125\" valign=\"top\"><div align=\"center\"><a href=\"mod.php?mod=gallery&op=media&media_id=$row[id]\"><img src=\"$gal_url/media/thumbnails/$row[id].$row[thumbnail_extension]\" alt=\"$row[title]\" border=\"$gal_pictborder\" /></a></div><span class=\"$gal_smalltext\"><b>$tran[Title]:</b> $row[title]<br /><b>$tran[Date]:</b> " .date($gal_time_format, $row[timestamp]). "<br /><b>$tran[file_size]:</b> $row[filesize] $tran[KB]<br /><b>$tran[Description]:</b> $row[short_description] <a href=\"mod.php?mod=gallery&op=media&media_id=$row[id]\">$tran[more]...</a></span></td>";
It is now inside an if clause:
if ($gal_show_picture_data) {
$content .= "<td class=\"$gal_td4\" width=\"125\" valign=\"top\"><div align=\"center\"><a href=\"mod.php?mod=gallery&op=media&media_id=$row[id]\"><img src=\"$gal_url/media/thumbnails/$row[id].$row[thumbnail_extension]\" alt=\"$row[title]\" border=\"$gal_pictborder\" /></a></div><span class=\"$gal_smalltext\"><b>$tran[Title]:</b> $row[title]<br /><b>$tran[Date]:</b> " .date($gal_time_format, $row[timestamp]). "<br /><b>$tran[file_size]:</b> $row[filesize] $tran[KB]<br /><b>$tran[Description]:</b> $row[short_description] <a href=\"mod.php?mod=gallery&op=media&media_id=$row[id]\">$tran[more]...</a></span></td>";
} else {
$content .= "<td class=\"$gal_td4\" width=\"125\" valign=\"top\"><div align=\"center\"><a href=\"mod.php?mod=gallery&op=media&media_id=$row[id]\"><img src=\"$gal_url/media/thumbnails/$row[id].$row[thumbnail_extension]\" alt=\"$row[title]\" border=\"$gal_pictborder\" /></a></div><span class=\"$gal_smalltext\"><a href=\"mod.php?mod=gallery&op=media&media_id=$row[id]\">$row[title] ($row[filesize] $tran[KB])</a><br/>$row[short_description]</span></td>";
}
The "else" portion has a shortened info section, with just the title and size. I'm still messing with it so this isn't the final result, but I thought it might be interesting/useful.
Thanks to all!
Thanks!