substitute original with normal? substitute original with normal?
 

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]

Main Menu

substitute original with normal?

Started by giorgio79, March 02, 2007, 07:57:14 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

giorgio79

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

Joachim Müller

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.

giorgio79

Now that is sweet :D

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

Thanks Gaugau!