coppermine-gallery.com/forum

Support => Older/other versions => cpg1.3.x Support => Topic started by: Fo on July 29, 2005, 06:13:56 PM

Title: View image dimensions and filesize under thumbnail
Post by: Fo on July 29, 2005, 06:13:56 PM
Sorry if this has been asked/solved before, I checked around and didn't see it.

I wanted to view image dimensions and filesize under each thumbnail in thumbnails.php. Since you can view them when you hover a thumbnail it should be possible to write them under a thumbnail.

Anyone knows how? I tried.. but failed miserably!

Thanks in advance
Title: Re: View image dimensions and filesize under thumbnail
Post by: Nibbler on July 29, 2005, 06:29:19 PM
Hi,

Similar things have been posted in the past, but here's what you need to do.

include/functions.inc.php:

find:

if($select_columns != '*') $select_columns .= ', title, caption,hits,owner_id,owner_name';

change to:

if($select_columns != '*') $select_columns .= ', title, caption,hits,owner_id,owner_name, pwidth, pheight';

scroll down to

$rowset[$key]['caption_text'] = $caption;

and just before/above it, add:

$caption .= "<span class=\"thumb_caption\">{$rowset[$key]['pwidth']} x {$rowset[$key]['pheight']}</span>";

That will apply the caption to regular album thumbnail views. You can apply it to meta albums using a similar method later on in the file.
Title: Re: View image dimensions and filesize under thumbnail
Post by: Fo on July 29, 2005, 08:48:46 PM
Thanks so much, you're a star!  ;)
Title: Re: View image dimensions and filesize under thumbnail
Post by: CPG Guru on August 01, 2005, 08:02:46 AM
THANKS NIBBLER ,IT ALSO HELPS ME :____---God BlessYou