coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: jarekn on July 20, 2009, 09:41:05 AM

Title: [Solved]: Where to hard code thumbnail size?
Post by: jarekn on July 20, 2009, 09:41:05 AM
Hello,

I have Size of thumbnails in pixels and Max dimension of a thumbnail set to 390 as that is the thumbnail size I want to use for my albums.  I want the thumbnails inside of an album to be much smaller - eg 150 wide...  When I tried to set the Max dimension to 150 it would keep all the thumbs small which would stretch them to 390 in Album list view and that looks very bad :(

So what I have done is set both to 390, hoping that I will be able to just modify the code for displaying the thumbs inside of an album to lets say 150 width & dynamic height... Problem is I am having problems finding which file and which line is responsible for displaying the thumbnail and setting the size :(  

Can anyone let me know where I can hard code the thumbnail display size once inside of an album?

THANX
Title: Re: Where to hard code thumbnail size?
Post by: Joachim Müller on July 20, 2009, 10:51:51 AM
There are several files that contain the code that compose the thumbnail output, but you should try to accomplish what you're up to by editing themes/yourtheme/theme.php. I can foresee your reply "but that file is nearly empty for me", so please review the theming section of the docs.

390 pixels for a thumb is a bit large imo and I simply can not see the point to create such large thumb and then HTML-resize them.
Maybe this will become more evident once you do as suggested per board rules (http://forum.coppermine-gallery.net/index.php/topic,55415.msg270616.html#msg270616) and post a link to your gallery ::).
Title: Re: Where to hard code thumbnail size?
Post by: jarekn on July 20, 2009, 07:34:12 PM
I tried to find the options for the theme.php but I was unable to locate them in the online Documentation... I found in some of the posts references to $CONFIG['thumbcols'] but nothing about thumb width and height.  Can you please point me in the right direction or just let me know what the line would be?

Thanx
Title: Re: Where to hard code thumbnail size?
Post by: Nibbler on July 20, 2009, 10:36:28 PM
I can't see an easy way to do it in theme.php.

Edit include/functions.inc.php here


$thumb_list[$i]['image'] = "<img src=\"" . $pic_url . "\" class=\"image\" {$image_size['geom']} border=\"0\" alt=\"{$row['filename']}\" title=\"$pic_title\"/>";


Change the {$image_size['geom']} to whatever combination of width="xxx" and/or height="xxx" you want.
Title: Re: Where to hard code thumbnail size?
Post by: jarekn on July 21, 2009, 07:36:44 PM
Thanx!  That is exactly what I was looking for, while not the perfect solution (as it would be nice if the system had two sets of thumbs) it will work for me :)

THANX again :)