forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 upload => Topic started by: giorgio79 on March 02, 2007, 07:57:14 am

Title: substitute original with normal?
Post by: giorgio79 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
Title: Re: substitute original with normal?
Post by: Joachim Müller 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.
Title: Re: substitute original with normal?
Post by: giorgio79 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!