[Solved]: Where to hard code thumbnail size? [Solved]: Where to hard code thumbnail size?
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

[Solved]: Where to hard code thumbnail size?

Started by jarekn, July 20, 2009, 09:41:05 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jarekn

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

Joachim Müller

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 and post a link to your gallery ::).

jarekn

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

Nibbler

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.

jarekn

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 :)