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: Protect Images  (Read 14230 times)

0 Members and 1 Guest are viewing this topic.

Andreu

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Protect Images
« 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.
Logged

xarumanx

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 61
    • http://gallery.webtips.at
Adding a Watermark on the fly
« Reply #1 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.]
Logged

<?php echo signature(); ?>

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Re: Adding a Watermark on the fly
« Reply #2 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
Logged
SANIsoft PHP applications for E Biz

DJAxion

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
    • http://the-expansion.com
Protect Images
« Reply #3 on: September 22, 2003, 08:01:38 pm »

xarumanx, thanks for deleting my credits in the logo.php file you share! :evil:  :evil:  :evil:
Logged

xarumanx

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 61
    • http://gallery.webtips.at
Protect Images
« Reply #4 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.
Logged

<?php echo signature(); ?>

DJAxion

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
    • http://the-expansion.com
Protect Images
« Reply #5 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:
Logged

DefenceTalk.com

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 230
    • http://www.defencetalk.com
Protect Images
« Reply #6 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
Logged
(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.defencetalk.com%2Fpictures%2Fsignature_cpg.php&hash=c0098ed5314d39beb9e8799c7c8787a9a0353b45)

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Protect Images
« Reply #7 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
Logged

DefenceTalk.com

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 230
    • http://www.defencetalk.com
Protect Images
« Reply #8 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
=
Logged
(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.defencetalk.com%2Fpictures%2Fsignature_cpg.php&hash=c0098ed5314d39beb9e8799c7c8787a9a0353b45)

DefenceTalk.com

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 230
    • http://www.defencetalk.com
Protect Images
« Reply #9 on: September 24, 2003, 02:53:31 am »

If anyone knows whats the problem, please help.

Thank you
Logged
(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.defencetalk.com%2Fpictures%2Fsignature_cpg.php&hash=c0098ed5314d39beb9e8799c7c8787a9a0353b45)

DefenceTalk.com

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 230
    • http://www.defencetalk.com
Protect Images
« Reply #10 on: September 24, 2003, 11:29:44 pm »

No one knows whats the fix??? :shock:
Logged
(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.defencetalk.com%2Fpictures%2Fsignature_cpg.php&hash=c0098ed5314d39beb9e8799c7c8787a9a0353b45)

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Protect Images
« Reply #11 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
Logged

DJAxion

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
    • http://the-expansion.com
Protect Images
« Reply #12 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...
Logged

xarumanx

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 61
    • http://gallery.webtips.at
Protect Images
« Reply #13 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?
Logged

<?php echo signature(); ?>
Pages: [1]   Go Up
 

Page created in 0.029 seconds with 18 queries.