Advanced search  

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]

Pages: [1]   Go Down

Author Topic: [Solved]: Where to hard code thumbnail size?  (Read 2109 times)

0 Members and 1 Guest are viewing this topic.

jarekn

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 47
[Solved]: Where to hard code thumbnail size?
« 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
« Last Edit: July 21, 2009, 11:44:51 pm by Joachim Müller »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Where to hard code thumbnail size?
« Reply #1 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 and post a link to your gallery ::).
Logged

jarekn

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 47
Re: Where to hard code thumbnail size?
« Reply #2 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
Logged

Nibbler

  • Guest
Re: Where to hard code thumbnail size?
« Reply #3 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

Code: [Select]
$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.
Logged

jarekn

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 47
Re: Where to hard code thumbnail size?
« Reply #4 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 :)
Logged
Pages: [1]   Go Up
 

Page created in 0.031 seconds with 20 queries.