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: Changing Thumb width/height in code  (Read 2078 times)

0 Members and 1 Guest are viewing this topic.

SolidSnake2003

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 79
  • Solid Snake/Joshua Harris Fan
    • Legacy Designs
Changing Thumb width/height in code
« on: July 26, 2014, 04:02:28 pm »

Using the code you provied for the custom thumbnail I got the thumbnail the way I wanted it.  But its still set to the thumb_nopic's dimensions of 128x128.  Using the code you provided me, is there a way to make it change the width and height to change it?  I know it can be done in CSS, but I don't like the look of it being squished, or stretched.

here is the code

Code: [Select]
        if (strpos($thumb['image'], 'images/thumbs/thumb_nopic.png')) {
            $thumb['image'] = str_replace('images/thumbs/thumb_nopic.png', 'themes/your_theme_name/your_images_folder/your_logo.png', $thumb['image']);
        }

Code: [Select]
        if (strpos($album['thumb_pic'], 'images/thumbs/thumb_nopic.png')) {
            $album['thumb_pic'] = str_replace('images/thumbs/thumb_nopic.png', 'themes/your_theme_name/your_images_folder/your_logo.png', $album['thumb_pic']);
        }

http://www.solidsnakelegacy.net/gallery
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15757
Re: Changing Thumb width/height in code
« Reply #1 on: July 30, 2014, 12:21:59 pm »

Using the code you provied for the custom thumbnail I got the thumbnail the way I wanted it.
For reference: http://forum.coppermine-gallery.net/index.php/topic,77664.msg375389.html#msg375389


Coppermine doesn't use the dimensions of thumb_nopic.png, but uses the value(s) you set in the thumbnail settings: http://documentation.coppermine-gallery.net/en/configuration.htm#admin_thumb_start

I suggest to resize your custom thumbnail accordingly.
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 21 queries.