Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Changing Thumb width/height in code  (Read 3808 times)

0 Members and 1 Guest are viewing this topic.

SolidSnake2003

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 82
  • 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: 15764
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.018 seconds with 19 queries.