Advanced search  

News:

cpg1.5.46 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter recently discovered vulnerabilities. It is important that all users who run version cpg1.5.44 or older update to this latest version as soon as possible.
[more]

Pages: 1 [2] 3 4   Go Down

Author Topic: Watermark on a per image basis  (Read 151061 times)

0 Members and 1 Guest are viewing this topic.

Frank

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Watermark on a per image basis
« Reply #20 on: February 01, 2004, 02:40:50 am »

I just thought about it... My galleries are user's galleries only, so the hack to hide the path to the pictures wouldn't work if someone is using public galleries (galleries non owned by users).

It would be easy to MOD it to make it work with both public and user's galleries. If anyone's interested I could take a look at it.


Frank
Logged

t3kn0byt3

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Watermark on a per image basis
« Reply #21 on: February 03, 2004, 04:18:16 am »

I used phpMyAdmin to update all the oldpics in my gallery with the watermark without going image to image.  Here is my code
Code: [Select]
UPDATE `cpg11d_pictures` SET `user1` = 'YES';
Change the cpg11d to whatever your prefix is.
Logged
(http://lbd1956.com/gallery/albums/userpics/10001/normal_t3kn0byt3.png)

almostaphotographer

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Thank You!!!
« Reply #22 on: February 17, 2004, 03:36:06 am »

This worked great!!  Thank you!!

Now, I need to find somebody that can create a mod so I can add pedigrees to horse pictures!!

Tracey  :D
Logged

t3kn0byt3

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Watermark on a per image basis
« Reply #23 on: February 17, 2004, 05:41:50 pm »

Quote
This worked great!! Thank you!!

Now, I need to find somebody that can create a mod so I can add pedigrees to horse pictures!!

Tracey


Try this thread:

http://forum.coppermine-gallery.net/index.php?topic=2526
Logged
(http://lbd1956.com/gallery/albums/userpics/10001/normal_t3kn0byt3.png)

almostaphotographer

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
That's good, but need to add a table for extra fields
« Reply #24 on: February 17, 2004, 07:15:54 pm »

Yes, I've got that and printed it out, but am trying to figure out (not a PHP programmer, wish I were) how to add a table so that the additional fields will show up in the template where I want them too.  Perplexing.
Logged

SPyKoN

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Watermark on a per image basis
« Reply #25 on: February 21, 2004, 04:41:43 pm »

Quote from: "Frank"
I just thought about it... My galleries are user's galleries only, so the hack to hide the path to the pictures wouldn't work if someone is using public galleries (galleries non owned by users).

It would be easy to MOD it to make it work with both public and user's galleries. If anyone's interested I could take a look at it.


Frank


Yeah, would be nice if it also worked with public galleries!
Logged

t3kn0byt3

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Watermark on a per image basis
« Reply #26 on: February 21, 2004, 05:48:39 pm »

Use this to update all images (including public) after they are uploaded.


Code:
UPDATE `cpg11d_pictures` SET `user1` = 'YES';

Change the cpg11d to whatever your prefix is.
Logged
(http://lbd1956.com/gallery/albums/userpics/10001/normal_t3kn0byt3.png)

Ravage

  • Coppermine newbie
  • Offline Offline
  • Posts: 15
Watermark on a per image basis
« Reply #27 on: March 03, 2004, 07:36:04 pm »

The mod works for me just fine but when in debug mode I get this error

Code: [Select]
Notice: Undefined index: user1 in /home/thomas/public_html/photos/include/functions.inc.php on line 1100

Line 1100 is
Code: [Select]
if ($pic_row['user1']!="") {

I took out the yes becuase I wanted all pics to be watermark.
Logged

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
Watermark on a per image basis
« Reply #28 on: March 03, 2004, 07:46:29 pm »

If you want all pics to be watermarked, simply use the original watermark mod, and save a custom field for something else.
Logged
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(http://www.mozilla.org/products/firefox/buttons/getfirefox_small.png)

Ravage

  • Coppermine newbie
  • Offline Offline
  • Posts: 15
Watermark on a per image basis
« Reply #29 on: March 03, 2004, 08:05:13 pm »

Inot sure which is the original. But couldn't use the other becuase no imagemagik installed.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Watermark on a per image basis
« Reply #30 on: March 04, 2004, 06:01:48 am »

there are two Watermark mods: one for ImageMagick, one for GD on the old board. See if the "old" one works for you...

GauGau
Logged

enginyr

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Watermark on a per image basis
« Reply #31 on: March 07, 2004, 12:56:02 pm »

Well I see all these posts and such about a mod that can insert a watermark and such but I need someone to handle this for me.
I have a nuke php forum and need the gallery to automatically add the watermark img and resize the picture:

600x400 @ 70kb
       
     From

2100 x 1600 @ 1.5 megs

I need someone who has already done this (no time for experimenting).

This is not a request for free help.....you will be paid.

I also need the scrolling gallery add-on.

Thanks, Steve....
Logged
Need help with gallery....will pay your time.

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Watermark on a per image basis
« Reply #32 on: March 07, 2004, 08:33:52 pm »

wrong board: nuke support has moved (see BOARD MOVED PLEASE READ THIS).

GauGau
Logged

Frank

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Watermark on a per image basis
« Reply #33 on: March 28, 2004, 06:47:14 pm »

I did a small modification which will not show the watermark on any thumbnail. It'll work 100% of the time. I did it because of the current way the mod was working: some thumbnails could be larger than what could be listed as not being watermarked (default: 200 pixels wide) and it wasn't looking professionnal when one large thumbnail had a watermark in the thumbnails page, while all the other thumbnails didn't have the watermark on!


In logo.php:
Replace:
Code: [Select]
if ($image_width > 200)

With:
Code: [Select]
if (!preg_match("/thumb_/i", "$picturename"))

How it works? It cheks if there's a "thumb_" in the filename, if no, then it prints the picture with the watermark ;)


Have fun, Frank
Logged

Frank

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Watermark on a per image basis
« Reply #34 on: March 29, 2004, 06:28:40 am »

I forgot something: if the picture is quite small when it isn't a thumbnail then with the modification I posted right on top of this post, a small picture could have been watermarked, which is quite ugly IMO lol.

To leave small images out of watermarking, simply:

Replace:
Code: [Select]
if (!preg_match("/thumb_/i", "$picturename"))

With:
Code: [Select]
if ((!preg_match("/thumb_/i", "$picturename")) && ($image_width > 250))


Have fun! Frank
Logged

Karri

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Gender: Female
  • Posts: 44
    • The Fuselage
Watermark on a per image basis
« Reply #35 on: March 29, 2004, 05:44:39 pm »

Quote from: "Frank"
I did a small modification which will not show the watermark on any thumbnail. It'll work 100% of the time. I did it because of the current way the mod was working: some thumbnails could be larger than what could be listed as not being watermarked (default: 200 pixels wide) and it wasn't looking professionnal when one large thumbnail had a watermark in the thumbnails page, while all the other thumbnails didn't have the watermark on!


Thanks for the addition!!!  I was never quite happy with how it determined a thumbnail. :)
Logged
Thanks,
Karri

yanola

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Watermark on a per image basis
« Reply #36 on: April 07, 2004, 01:41:29 am »

Quote from: "t3kn0byt3"
I used phpMyAdmin to update all the oldpics in my gallery with the watermark without going image to image.  Here is my code
Code: [Select]
UPDATE `cpg11d_pictures` SET `user1` = 'YES';
Change the cpg11d to whatever your prefix is.


Do I need to have phpMyAdmin installed in order to use this code?  How would I implement it?
Logged

Nibbler

  • Guest
Watermark on a per image basis
« Reply #37 on: April 07, 2004, 01:59:15 am »

If you dont have access to phpmyadmin or similar, then just save the following into a php file, upload to your cpg dir and run it from your browser.

Code: [Select]

<?php
define
('IN_COPPERMINE'true);
require(
'include/init.inc.php');
echo 
mysql_query("UPDATE `cpg11d_pictures` SET `user1` = 'YES'") ? "Succeeded" mysql_error();
?>

Logged

yanola

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Watermark on a per image basis
« Reply #38 on: April 07, 2004, 02:07:43 am »

Quote from: "Nibbler"
If you dont have access to phpmyadmin or similar, then just save the following into a php file, upload to your cpg dir and run it from your browser.

Code: [Select]

<?php
define
('IN_COPPERMINE'true);
require(
'include/init.inc.php');
echo 
mysql_query("UPDATE `cpg11d_pictures` SET `user1` = 'YES'") ? "Succeeded" mysql_error();
?>



Thank you!!!

=edited=

Is there a way I can get the watermark to show up over the slideshow?
Logged

troublemaker

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 40
    • http://www.clynefan.com
Watermark on a per image basis
« Reply #39 on: April 15, 2004, 07:19:09 am »

:cry:
I'm really not this smart
anyone able to break this down for me?
 pm me if your shy of showing your tender side
Logged
Site Admin's @ coppermine kick much techie @$$
Pages: 1 [2] 3 4   Go Up
 

Page created in 0.022 seconds with 21 queries.