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: substitute original with normal?  (Read 1977 times)

0 Members and 1 Guest are viewing this topic.

giorgio79

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 114
substitute original with normal?
« on: March 02, 2007, 07:57:14 am »

Hi Guys,

I would like to save space by having coppermine substituting the original pic with the normal pic.

That is, there will be only one pic stored (besides the thumbnail), the normal version, and when the user clicks on the normal picture, the normal will be displayed in place of the original.

Before, I used the mod below in picmgmt.inc.php, but this resulted in a blank screen when I click on the normal version (This mod deletes the original right after upload, but the link in cpg is still pointing to it...)

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

/added after
...'{$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);

Could anyone give me some advice?

Thank you,
Gyuri
« Last Edit: March 02, 2007, 02:04:01 pm by GauGau »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: substitute original with normal?
« Reply #1 on: March 02, 2007, 08:00:02 am »

Set width for intermediate image to same size as the max fullsize dimensions, say no to intermediate creation, say yes:everone to resizing of full-size and you should be done without modifying anything at all.
Logged

giorgio79

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 114
Re: substitute original with normal?
« Reply #2 on: March 02, 2007, 11:09:31 am »

Now that is sweet :D

Usually the best solutions require the least amount of effort :P

Thanks Gaugau!
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 19 queries.