Hi! I was wondering if it's possible to display image size and dimensions beside thumbnails? I have remove the display of captions besides the thumbnails but would like to replace it with the image size and dimensions? I know php have commands such as getimagesize() and so on to get the relevant sats but I don't know where to place them in the files.
Thank you all.
Posts: 86
Hi! I finally manage to get the script to print out the image (not the thumbnails) dimensions in the page where the thumbnails are printed. I'm sure there is a easier way to do this but it serves my purpose. The codes below are cut and paste from other files from the scripts.
To do so, paste the following codes into the view_album.php file. They should just before the line <!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE> includeHtmlWrap('inline_photothumb.frame'); </TD></TR></TABLE><!-- BBCode End -->.
<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE>
$photo = $gallery->album->getPhoto($i);
$url_photo = $gallery->album->getPhoto($i);
$image_photo = $photo->image;
list($imagewidth, $imageheight) = $image_photo->getRawDimensions();
$gallery->html_wrap['dim'] = $imagewidth . "x" . $imageheight; </TD></TR></TABLE><!-- BBCode End -->
Then add this line to where you want the dimensiosn to be printed out. For me I added it to the inline_photothumb_frame in the html_wrap directory. I added it to the last line in the file.
<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE><br>[<?php echo $dimensions ?>]</TD></TR></TABLE><!-- BBCode End -->
Hope this is useful.