Changing Thumb width/height in code Changing Thumb width/height in code
 

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

Changing Thumb width/height in code

Started by SolidSnake2003, July 26, 2014, 04:02:28 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

SolidSnake2003

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

        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']);
        }


        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

ΑndrĂ©

Quote from: SolidSnake2003 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.
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.