News:

CPG Release 1.6.28
added submissions from {406man}
cleaned up a few PHP (8.4) deprecations
fixed PHP deprecation in calendar
removed security vulnerability
(please upgrade when possible)

Main Menu

Protect Images

Started by Andreu, September 22, 2003, 02:53:59 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Andreu

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.

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

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

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

and replace it with

        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.]

<?php echo signature(); ?>
?>


Tarique Sani

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
SANIsoft PHP applications for E Biz

DJAxion

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

xarumanx

QuoteI 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.

<?php echo signature(); ?>
?>


DJAxion

Quote from: "xarumanx"First read, then post :!:

Good tip! :wink: I was high speed reading... Sorry :oops:

DefenceTalk.com

xarumanx, the link to those files are dead. It would be great if you can post the code on the forum....

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

Joachim Müller

please send me the files as pm attachment, I'll put them into the download section.

GauGau

DefenceTalk.com

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
=
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.defencetalk.com%2Fpictures%2Fsignature_cpg.php&hash=c0098ed5314d39beb9e8799c7c8787a9a0353b45)

DefenceTalk.com

If anyone knows whats the problem, please help.

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

DefenceTalk.com

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

Joachim Müller

this board is not a hotline. Stop speed-posting! :x

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

GauGau

DJAxion

the "imageinfo.php" file posted in this forum is the problem.
I'll post the right one tonight...

xarumanx

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?

<?php echo signature(); ?>
?>