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: Enable watermark only for certain album..  (Read 2716 times)

0 Members and 1 Guest are viewing this topic.

mr.bena

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 117
Enable watermark only for certain album..
« on: April 02, 2012, 03:51:48 pm »

Hi, I would like to enable watermark for certain album only and not the whole album of my gallery. For example, if a user upload a picture in "Models" album, the picture should be watermarked but if he uploads a picture in "Natures" album that picture will not be watermarked..



Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Enable watermark only for certain album..
« Reply #1 on: April 02, 2012, 07:01:14 pm »

Haven't tried this but it schoul work...
open include/picmagmnt.inc.php and within the function add_picture add right after the global definitions

Code: [Select]
$exclude = array(1, 7, 12, 15);
if (in_array($aid, $exclude)) {
$CONFIG['enable_watermark'] = 0;
}

The $exclude array is what you have to define yourself. Add there all album ids you want to exclude from watermarking.

Ahm.. if you want to do it the other way round... let's say you disable watermarking in config and just want to enable it for some albums, then you change $CONFIG['enable_watermark'] = 0; to 1

mr.bena

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 117
Re: Enable watermark only for certain album..
« Reply #2 on: April 03, 2012, 12:11:25 am »

It works! Thank you so much for your help.

Ben.
Logged
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 19 queries.