Watermark on a per image basis - Page 2 Watermark on a per image basis - Page 2
 

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

Main Menu

Watermark on a per image basis

Started by Karri, January 22, 2004, 02:15:46 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

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

t3kn0byt3

I used phpMyAdmin to update all the oldpics in my gallery with the watermark without going image to image.  Here is my code
UPDATE `cpg11d_pictures` SET `user1` = 'YES';
Change the cpg11d to whatever your prefix is.
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Flbd1956.com%2Fgallery%2Falbums%2Fuserpics%2F10001%2Fnormal_t3kn0byt3.png&hash=bb517bf5f9748ebe2ab389aeb8f2abf5a69d7f60)

almostaphotographer

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

t3kn0byt3

QuoteThis 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
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Flbd1956.com%2Fgallery%2Falbums%2Fuserpics%2F10001%2Fnormal_t3kn0byt3.png&hash=bb517bf5f9748ebe2ab389aeb8f2abf5a69d7f60)

almostaphotographer

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.

SPyKoN

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!

t3kn0byt3

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.
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Flbd1956.com%2Fgallery%2Falbums%2Fuserpics%2F10001%2Fnormal_t3kn0byt3.png&hash=bb517bf5f9748ebe2ab389aeb8f2abf5a69d7f60)

Ravage

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

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

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

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

hyperion

If you want all pics to be watermarked, simply use the original watermark mod, and save a custom field for something else.
"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

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

Ravage

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

Joachim Müller

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

GauGau

enginyr

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....
Need help with gallery....will pay your time.

Joachim Müller

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

GauGau

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!


In logo.php:
Replace:
if ($image_width > 200)

With:
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

Frank

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:
if (!preg_match("/thumb_/i", "$picturename"))

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


Have fun! Frank

Karri

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. :)
Thanks,
Karri

yanola

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
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?

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.


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


yanola

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.


<?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?

troublemaker

: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
Site Admin's @ coppermine kick much techie @$$