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: Using own Thumbnails  (Read 3144 times)

0 Members and 1 Guest are viewing this topic.

esugrue

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Using own Thumbnails
« on: March 10, 2005, 04:12:32 am »

Hi!

I am trying to upload my own thumbnails for CPG (1.3.2) to use. I want all thumbs to be the same size (eg: 75x75)

Unfortunately I have already uploaded my images and CPG has created thumbs itself so is it possible to replace CPGs thumbs with mine.

I tried uploading my own thumbs and replacing the thumb_ files but it's still resizing them to the original thumb size it created (getting it from Sql database maybe?). Anyway around this apart from uploading all my thumbs and recreating all new galleries?

Thanks
Ernie
« Last Edit: March 10, 2005, 08:34:24 am by esugrue »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Using own Thumbnails
« Reply #1 on: March 10, 2005, 09:34:19 am »

upload your custom thumbs, then go to "admin tools" and chose "Update thumbs and/or resized photos" with the option "Only thumbnails" selected. Not completely sure if this does what you're up to, but worth a try. Another solution is to edit the database entries (thumbnail dimensions) directly in phpMyAdmin (or similar). Another option is to remove the width and height attributs of the <img> tag for thumbnails (with a small penalty on performance and standards compliance).

Joachim
Logged

esugrue

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: Using own Thumbnails
« Reply #2 on: March 10, 2005, 03:23:11 pm »

Hi:

Thanks for the help, I've tried but am still having problems.

If I upload my 75x75 thumbs and then go to Admin Tool and update thumbs it recreates the thumbs again (hence overwriting my thumbs).

I am unsure where to look to find the height/width attributes for the thumbs on the generated page. I looked in theme.php which seems to be the page that creates the output page but cannot find where it's mentioned. I was thinking maybe to try and change the page generation to height=75 width=75 rather than remove the dimensions altogether.

Since I have 14000 images already added, this maybe my best/only reasonable option.

So where can I go to change to force code the thumb size on the generated page(s)

Thanks heaps
Ernie
Logged

omniscientdeveloper

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 901
Re: Using own Thumbnails
« Reply #3 on: March 11, 2005, 12:50:42 am »

Upload your thumbs then set the size to 75 in config. That should be all you have to do.
Logged

esugrue

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: Using own Thumbnails
« Reply #4 on: March 11, 2005, 01:44:09 am »

Hi!

I tried that but still no luck. Here's what I'm doing/done!

I've already added 14000 images into 200+ albums and when I added them CPG created thumbnails to 75px (max aspect) as in the config.

I want to upload my own thumbnails that are 75x75 cropped.

I have tried:

1) Simply uploading the thumbs - but the original thumb dimensions must be in the sql table as it resizes my 75x75 to what it originally created the thumbnail as (eg: 75x60, 55x75 etc).

2) I tried uploading my thumbnails (75x75) and going to Admin Tools and updating the thumbnails only, but it went through and said they were all done correctly, but it recreated all the thumbnails. So it was back to the beginning.

I can set the size in config to 75 but I only get a Height, Width or Max Aspect choice (none of which is suitable as I want all thumbs to be 75x75 cropped to aspect).

I was going to edit the thumbnail page where they were displayed but cannot find the code to edit (if I can do this at all!).

Thanks
Ernie
Logged

Venus

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Using own Thumbnails
« Reply #5 on: March 12, 2005, 05:31:27 pm »

I m not sure what exactly is your problem but I have similar I've uploaded my own thumbs 75x80 and they are resized by cpg to 75x91 they look good but around them is black "border" and it is not looking good. Does anyone know if there is possibility to remove it?

(http://img29.exs.cx/img29/1104/thumby7fo.jpg)
Logged

Nibbler

  • Guest
Re: Using own Thumbnails
« Reply #6 on: March 13, 2005, 05:03:03 pm »

Change to a different theme and see if the border goes away.
Logged

Venus

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Using own Thumbnails
« Reply #7 on: March 14, 2005, 06:23:12 pm »

I fixed it :)

Esugrue if you go to config at put there 75 as max height it will resized your width a little but it will still looking good. I done it this way on my site and it works. I think there is no way to put them to be 75x75.

Logged
Pages: [1]   Go Up
 

Page created in 0.091 seconds with 20 queries.