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 [2] 3 4   Go Down

Author Topic: Another watermark mod (simpliest available) GD2 compatiable  (Read 75478 times)

0 Members and 1 Guest are viewing this topic.

skybax

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 180
    • SKYBAX Communications
Re: Another watermark mod (simpliest available) GD2 compatiable
« Reply #20 on: September 06, 2004, 01:46:45 pm »

I'm in the process of rewriting the code so that it has it's own field and can be controlled site wide via config. I am also working on adding hooks so that it can be writen in as a plugin once that is released in stable. Since I was out all last week from flooding and schedules I am getting back in the groove on testing the mods. I hope to release the finalized version sometime soon.

-T
Logged
(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.skybax.com%2FhotImage%2Fpost_footer.gif&hash=338b65c57a59f0b06311094e697c87794e43d945)
Don't contact me for support over PM or email unless I requested you to do so. Instead: post on the proper board.

squish

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Another watermark mod (simpliest available) GD2 compatiable
« Reply #21 on: September 06, 2004, 06:41:31 pm »

I managed to figure it out, when I was commenting out that first like, I also commented out the squiggle ( } ) that was right below it.

Thanks the help
« Last Edit: September 08, 2004, 07:10:38 am by squish »
Logged

crashnet

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 69
Re: Another watermark mod (simpliest available) GD2 compatiable
« Reply #22 on: September 10, 2004, 09:16:36 pm »

Well, I got it to say something, but each time I click on an image that I have applied the watermark to, I get ths error:

Quote
Watermarking file: images/watermark.png did not work!

The watermark image is in the right folder, the word "watermark" is in user1, and I checked and rechecked watermark.class.php.  I have to remove the mod in order to be able to view any of my images again.  What would cause this error?  Am I supposed to modify this stuff, and if so, can you be a little more detailed as of what you are asking to change these paths too.  The wording is a litte confusing.

Code: [Select]
class Watermark
    {
        /**
        * Directory where the created watermarked images are stored in (for PHP access)
        * e.g. '/usr/local/apache/htdocs/images/watermark'
        */
        var $thumbnail_dir_internal  =  '/home/erotic/public_html/wmarked/';
        /**
        * Path to watermarked directory for browser/coppermine access
        * e.g. '/images/thumbnails'
        */
        var $thumbnail_dir_external  =  '../wmarked/';
/**
        * Watermarked image suffix for new watermarked image
        * e.g. 'watermarksuffix_orginal.jpg'
        * WARNING: Cannot be left blank
        */
var $file_suffix = 'watermark_';
        /**
        * Error message if creation fails, this will crash the gallery for the particular image if all fails...
        */
        var $error;
        /**
        * where the watermark is inserted
        * topleft, bottomleft, topright, bottomright
        */
var $watermark_position = "bottomright";
        /**
        * the watermark filename
* currently MUST be a PNG24 file! working on gif/jpg support
        */
var $watermark_file;
        /**
        * which kind of output is request
        * valid value is JPG, PNG*
*    * if using PNG - look @ www.skybax.com for more information on how to secure images
*      (neat transparency effect that disables 'easy' harvesting of images)
        */
var $extension = 'JPG';
        /**
* this method REQUIRES the GD 2.0+
        * @param string $imagefile Filename of source image
        */

« Last Edit: September 10, 2004, 09:37:49 pm by crashnet »
Logged

trouble

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Another watermark mod (simpliest available) GD2 compatiable
« Reply #23 on: September 12, 2004, 07:05:16 am »

is it supposed to work on windows server? i ve done everything as described in this forum, but i get the following error when trying to view the image.

Warning: imagecreatefromjpeg(albums/userpics/10001/thumb_DSC00267%20%28Large%29.JPG): failed to open stream: No such file or directory in
D:\My Webs\anglija.com\webroot\album\include\watermark.class.php on line 176
Could not create from JPEG

any ideas?

------------

ok i fixed it. I will leave this post should it help anyone.
1. file name was a problem. it doesnt like filenames with anything in it, except basic charachters.
2. need to give write permission rigths to "wmarked" folder. In windows its done via security option on folder right-click menu.
3. had to change $thumbnail_dir_external variable to full path from root. dunno why it didnt like the original one. i changed it to:
var $thumbnail_dir_external  =  '/album/wmarked/';
4. i dont remember what else i done, sorry im a bit drunk.

any problems gimme a shout. i may be able to help. you can see my watermarks in action at http://www.anglija.com/album/displayimage.php?album=7&pos=1 :o)

would be kool if anyone could fix this problem with filenames. cause its really complicated to force everyone to upload pics with certain naming rules - its rather impossible.
« Last Edit: September 12, 2004, 08:10:45 am by trouble »
Logged

trouble

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Another watermark mod (simpliest available) GD2 compatiable
« Reply #24 on: September 12, 2004, 05:28:00 pm »

anyone who has problems with file names, and want to use chars like: + = & - ( )  etc.. in file names, could use this quick fix solution:
in file "functions.inc.php" find a line:
"$picture_location = $url_prefix[$pic_row['url_prefix']]. path2url($pic_row['filepath']. $pic_prefix[$mode]. $pic_row['filename']);;"

and insert this line straight after that:
$picture_location = rawurldecode($picture_location);

should do the trick.
Logged

erroneus

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 58
Re: Another watermark mod (simpliest available) GD2 compatiable
« Reply #25 on: September 14, 2004, 01:11:24 pm »

anyone who has problems with file names, and want to use chars like: + = & - ( )  etc.. in file names, could use this quick fix solution:
in file "functions.inc.php" find a line:
"$picture_location = $url_prefix[$pic_row['url_prefix']]. path2url($pic_row['filepath']. $pic_prefix[$mode]. $pic_row['filename']);;"

and insert this line straight after that:
$picture_location = rawurldecode($picture_location);

should do the trick.

awesome! thanks! the filename problem was pretty much the only thing preventing me from using this great watermark mod. Will this allow filenames with spaces too now?
Logged

nugget

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Another watermark mod (simpliest available) GD2 compatiable
« Reply #26 on: November 29, 2004, 08:03:00 pm »

what do you mean with "comment the code out" sry my english is baad ;)
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Another watermark mod (simpliest available) GD2 compatiable
« Reply #27 on: November 29, 2004, 08:27:59 pm »

Commenting methods depend on the code. Please specify where you saw that suggestion and which code it pertains to.
Logged

jojo3ep

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Another watermark mod (simpliest available) GD2 compatiable
« Reply #28 on: December 26, 2004, 10:10:28 pm »

I have installed this hacks, but even if I have followed all recommandations posted, no watermark is added to my picture even I hae added to user file 1 : yes !
What can I do ? I have to error message but as well no watermark ! Thanks
Logged

skybax

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 180
    • SKYBAX Communications
Re: Another watermark mod (simpliest available) GD2 compatiable
« Reply #29 on: December 29, 2004, 08:09:12 pm »

please provide a sample link and the code for the class you are using.

-T
Logged
(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.skybax.com%2FhotImage%2Fpost_footer.gif&hash=338b65c57a59f0b06311094e697c87794e43d945)
Don't contact me for support over PM or email unless I requested you to do so. Instead: post on the proper board.

irishblue

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Another watermark mod (simpliest available) GD2 compatiable
« Reply #30 on: January 01, 2005, 12:53:47 pm »

thanks for this mod! Got it working great.
Except it doesn't seem to appear on the portrait oriented pictures, only the landscape ones. Any idea how to fix that?
Logged

skybax

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 180
    • SKYBAX Communications
Re: Another watermark mod (simpliest available) GD2 compatiable
« Reply #31 on: January 02, 2005, 09:54:01 pm »

it should work - however it may depend on the size of your pictures - if the math determines the picture is too small so that your watermark doesn't engulf the image...

-T
Logged
(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.skybax.com%2FhotImage%2Fpost_footer.gif&hash=338b65c57a59f0b06311094e697c87794e43d945)
Don't contact me for support over PM or email unless I requested you to do so. Instead: post on the proper board.

irishblue

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Another watermark mod (simpliest available) GD2 compatiable
« Reply #32 on: January 03, 2005, 09:05:04 am »

ah ok thanks! :) Yeah might be that the image is too small.
Got another question, is the script supposed to watermark the thumbnails too?
I have a 1064 x 1600 pixels image, but only the full-sized version gets watermarked, but the thumbnail on the individual viewing (displayimage) page doesn't.

If its not supposed to, is it possible to set it to do so? perhaps use a smaller version or separate watermark image so it fits the thumbnail?
Logged

skybax

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 180
    • SKYBAX Communications
Re: Another watermark mod (simpliest available) GD2 compatiable
« Reply #33 on: January 05, 2005, 04:44:06 pm »

the script excludes the thumbnails because I found that watermarks looked really crappy shrunk - however it is possible... and you can set it up so that it uses a different wmark for the thumbnail you would just have to modify the code for dispalying the thumbnails... (theme.php i believe)
Logged
(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.skybax.com%2FhotImage%2Fpost_footer.gif&hash=338b65c57a59f0b06311094e697c87794e43d945)
Don't contact me for support over PM or email unless I requested you to do so. Instead: post on the proper board.

irishblue

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Another watermark mod (simpliest available) GD2 compatiable
« Reply #34 on: January 05, 2005, 06:25:19 pm »

is it possible to just get it to shrink the watermark together with the pic?
if so, which file should i make the changes to?
the separate watermark sounds complicated and i'm not very good with code  ???
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Another watermark mod (simpliest available) GD2 compatiable
« Reply #35 on: January 05, 2005, 06:42:53 pm »

What you can do is, after watermarking the larger photos, go into admin tools. There is an option to regenerate the thumbnails. The new thumbnails will be using the watermarked files so the watermarks will show up on thumbnails. That's what happened to my files, though I did not want watermarks on my thumbnails.
Logged

irishblue

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Another watermark mod (simpliest available) GD2 compatiable
« Reply #36 on: January 06, 2005, 08:20:03 am »

i tried that once while experimenting with the sizes. I went into admin tools after watermarking and regenerated the thumbnails. and all the files even the actual sized ones were grabbing files from the e.g. userpic/10001 folder instead of the wmarked folder. so all ended up w/o watermarks.
Logged

atommyk

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Another watermark mod (simpliest available) GD2 compatiable
« Reply #37 on: January 15, 2005, 12:19:29 pm »

Quote
I wanted to be able to specify which images to watermark indivually within an album.
I don't know if this information can be found in your post, but is there a "standard-value" for the user1-field? Because if I undertand right, I would have to label each picture with user1-field "yes" manually - tell me that I'm wrong ;)
Logged

skybax

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 180
    • SKYBAX Communications
Re: Another watermark mod (simpliest available) GD2 compatiable
« Reply #38 on: January 16, 2005, 03:42:27 am »

you are correct about manually inputting all the value to turn on the watermarking feature.
Logged
(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.skybax.com%2FhotImage%2Fpost_footer.gif&hash=338b65c57a59f0b06311094e697c87794e43d945)
Don't contact me for support over PM or email unless I requested you to do so. Instead: post on the proper board.

davidshook

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: Another watermark mod (simpliest available) GD2 compatiable
« Reply #39 on: February 24, 2005, 05:04:02 am »

I am sorry if this is answered somewhere in this thread allerady.
How exactly does this MOD work:
1) do all the batch uploaded pictures get watermarked?
-- or, do I get to chose if batch uploaded pictures get watermarked?

2)  do individual uploaded pictures get water marked?
-- do users/members (as opposed to admin level) have any control over the water marking process in this case.

3) what happens when a user uploads video, mp3, zip, pdf file?
-- does the upload faile?
-- does the file become unreadable?


The reason I am asking this is because I am designing a site that will have  a gallery that allows loged-in members to upload there own pictures/videos/documents. I want to have a watermark on the pictures that the users upload. The user should not be able to upload a picture without a water mark (although it is ok if they have a choice where to place the watermark on the picture)

The rest of the galleries are not for uploads by users. For these galleries I do the batch uploading and the pictures are already watermarked on my desktop pc prior to upload.

So, to some it up: all pictures that are uploaded via http/form need to be watermarked.
Batch files should not be watermarked.
Non-picture files should not be a problem (since I do not limit the file type to be uploaded)


I also think that anyone that thinks about using water marking should have these answers before going through the work of installing and testing the MOD's.

Please help, thank's in advance
Logged
Pages: 1 [2] 3 4   Go Up
 

Page created in 0.032 seconds with 19 queries.