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: after picture uploaded no normal thumb is displayed  (Read 2413 times)

0 Members and 1 Guest are viewing this topic.

giorgio79

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 114
after picture uploaded no normal thumb is displayed
« on: February 19, 2007, 07:32:10 pm »

Hello Guys,

I came across a few pictures that do not upload properly in CPG

There are no error messages, it is just that no normal size version is created just a thumbnail, and a white area is displayed when I click on the thumb.

I am attaching 3 of them here, I downloaded them from a free foto site.

I understand this may do with EXIF stuff and GD1? Anyway, my goal is to have a normal version created, as the last thing I want my visitors to see is that white blank photo area.

I am currently reading on the posts but just in case I thought I post this.

Can you please advise?

Thank you,

Gyuri
« Last Edit: February 23, 2007, 04:50:08 pm by GauGau »
Logged

giorgio79

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 114
Re: after picture uploaded no normal thumb is displayed
« Reply #1 on: February 19, 2007, 07:53:37 pm »

hmmm

just fouind this post

http://forum.coppermine-gallery.net/index.php?topic=37776.0

Nibbler mentions here that the pic may be too small and does not qualify for normal size version...

Interesting. I modded my picmgmt file to uinlink the original after upload to save space, so this may be the issue.

With this knowledge, the question becomes, can I force (in an easy way) coppermine to create a normal version?

Cheers,
Gyuri
Logged

giorgio79

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 114
Re: after picture uploaded no normal thumb is displayed
« Reply #2 on: February 19, 2007, 08:16:09 pm »

Ah found the solution here

http://forum.coppermine-gallery.net/index.php?topic=37092.0

Thank you if you read my post :)
Logged

giorgio79

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 114
Re: after picture uploaded no normal thumb is displayed
« Reply #3 on: February 19, 2007, 08:22:16 pm »

One last thing,

I checked my "Max width or height of an intermediate picture/video" and it is set to 600.

But just because the original is not this big, I still think there should be a normal_ version created, because if not, when we click on the thumbnail, we will see the blank page?

What do you think?
Logged

giorgio79

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 114
Re: after picture uploaded no normal thumb is displayed
« Reply #4 on: February 19, 2007, 09:28:56 pm »

Ok, I solved my problem :)

Basically, I introduced an unlink function in picmgmt which removed the originals after upload...

Now this created this issue, that smaller photos that did not meed the max setting for the intermediate pics were not created, but I was also deleting the originals, so this posed a problem.

I modded my unlink function like this

if (file_exists($normal)) {
@unlink($image);
};


which I placed right after a long SQL query in picmgmt.inc.php

 '{$CURRENT_PIC_DATA['owner_id']}', '{$CURRENT_PIC_DATA['owner_name']}','{$CURRENT_PIC_DATA['title']}', '{$CURRENT_PIC_DATA['caption']}', '{$CURRENT_PIC_DATA['keywords']}', '{$CURRENT_PIC_DATA['approved']}', '{$CURRENT_PIC_DATA['user1']}', '{$CURRENT_PIC_DATA['user2']}', '{$CURRENT_PIC_DATA['user3']}', '{$CURRENT_PIC_DATA['user4']}', '{$CURRENT_PIC_DATA['pic_raw_ip']}', '{$CURRENT_PIC_DATA['pic_hdr_ip']}', '{$CURRENT_PIC_DATA['position']}')";
    $result = cpg_db_query($query);

Cheers,

Gyuri
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 20 queries.