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: substitute original with normal?  (Read 2119 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.018 seconds with 19 queries.