forum.coppermine-gallery.net

Support => Older/other versions => cpg1.1.X Support (standalone) => Topic started by: Andreu on September 22, 2003, 02:53:59 pm

Title: Protect Images
Post by: Andreu on September 22, 2003, 02:53:59 pm
Hello

In the other Board about Coppermine, one Post "spoke" about the protect of the images with LOGO.PHP ¿somebody can paste this post here?


Thanks and sorry for my english.
Title: Adding a Watermark on the fly
Post by: xarumanx on September 22, 2003, 03:45:10 pm
1. Copy and paste the code to your favourite text editor and save them as
logo.php: http://gallery.webtips.at/logo.phps
and imageinfo.php: http://gallery.webtips.at/imageinfo.phps

2. Create a logo.png file

3. If your logo.png file isn't 190 x 23 Pixels in size, edit the values in the logo.php between lines 23 and 36

4. upload the logo.php, logo.png and imageinfo.php into your gallery root dir

5. edit the /includes/functions.inc.php file of your gallery installation.
Find the following line
Code: [Select]

        return $url_prefix[$pic_row['url_prefix']]. path2url($pic_row['filepath']. $pic_prefix[$mode]. $pic_row['filename']);

and replace it with
Code: [Select]

        return 'logo.php?picturename='.$url_prefix[$pic_row['url_prefix']]. path2url($pic_row['filepath']. $pic_prefix[$mode]. $pic_row['filename']);


6. Done. Please be careful when editing the functions.inc.php. Make a backup copy of thw file before editing it!

I take no credit for this code. The posted .php files have been taken from the original coppermine support board and modified slightly by me (mainly readability issues). I don't remember who wrote the original logo.php, if someone can tell me, I'll add the copyright information in the logo.phps file provided at gallery.webtips.at for download.

[EDIT: The code you have to replace in function.inc.php is broken up by the forum. Please assure, that the code doesn't spread over two lines.]
Title: Re: Adding a Watermark on the fly
Post by: Tarique Sani on September 22, 2003, 04:00:13 pm
Quote from: "xarumanx"
1. Copy and paste the code to your favourite text editor and save them as
logo.php: http://gallery.webtips.at/logo.phps
and imageinfo.php: http://gallery.webtips.at/imageinfo.phps


I guess I will just add this as a feature - which the Admin can control
Title: Protect Images
Post by: DJAxion on September 22, 2003, 08:01:38 pm
xarumanx, thanks for deleting my credits in the logo.php file you share! :evil:  :evil:  :evil:
Title: Protect Images
Post by: xarumanx on September 22, 2003, 08:23:11 pm
Quote
I take no credit for this code. The posted .php files have been taken from the original coppermine support board and modified slightly by me (mainly readability issues). I don't remember who wrote the original logo.php, if someone can tell me, I'll add the copyright information in the logo.phps file provided at gallery.webtips.at for download.


First read, then post :!:
I didn't meant to redistribute the code, so i optimized it for my own uses. I'll put the copyright back in, as i said in my first answer.
Title: Protect Images
Post by: DJAxion on September 22, 2003, 08:49:35 pm
Quote from: "xarumanx"
First read, then post :!:


Good tip! :wink: I was high speed reading... Sorry :oops:
Title: Protect Images
Post by: DefenceTalk.com on September 23, 2003, 11:15:53 pm
xarumanx, the link to those files are dead. It would be great if you can post the code on the forum....

Thanks
Title: Protect Images
Post by: Joachim Müller on September 23, 2003, 11:40:40 pm
please send me the files as pm attachment, I'll put them into the download section.

GauGau
Title: Protect Images
Post by: DefenceTalk.com on September 24, 2003, 01:14:36 am
Well, now I can't seem to see the pictures or the thumbs... any idea what I did wrong? xarumanx?


http://www.defencetalk.com/pictures
=
Title: Protect Images
Post by: DefenceTalk.com on September 24, 2003, 02:53:31 am
If anyone knows whats the problem, please help.

Thank you
Title: Protect Images
Post by: DefenceTalk.com on September 24, 2003, 11:29:44 pm
No one knows whats the fix??? :shock:
Title: Protect Images
Post by: Joachim Müller on September 24, 2003, 11:50:30 pm
this board is not a hotline. Stop speed-posting! :x

Instead - read http://coppermine.sourceforge.net/faq.php?q=lamesupport#lamesupport  :evil:

GauGau
Title: Protect Images
Post by: DJAxion on September 25, 2003, 08:57:40 am
the "imageinfo.php" file posted in this forum is the problem.
I'll post the right one tonight...
Title: Protect Images
Post by: xarumanx on September 25, 2003, 10:17:33 am
btw: The imageinfo.php i use (the one posted above) throws an error about one undefined function when viewing a picture. It#s not doing any harm on the user side, but I'd like to clean this up, because the error keeps getting reported in my servers error log.
Is this somehow related to your last post, DJAxion?