Prevent downloading of pics - transparent gif overlay Prevent downloading of pics - transparent gif overlay
 

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]

Main Menu

Prevent downloading of pics - transparent gif overlay

Started by Stramm, July 12, 2006, 09:43:57 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Stramm

That's a lil theme addition. So you won't need to modify core files. This addition puts a transparent gif over the actual intermediate or fullsized image. If a user tries to download the image he only gets the transparent gif. Same if he tries to find out the URL (with tight click -> properties). This is no 100% secure solution but protects against most newbies and lazy users. Also it's 100 times better than blocking the right mouse button (at least I hate sites that use that techniques and leave)

Installation: unzip the attachment and open the txt file. It's contents copy into the theme.php you're actually using or want to use the transparent gif overlay on (right above the final ?>).
In most cases that's it. If however the two included functions are already in your theme.php (function theme_html_picture, function theme_display_fullsize_pic) then please ask here what to modify exactly.

Finally copy the overlay.gif into your coppemine/images directory

the modpack version can be found here
http://forum.coppermine-gallery.net/index.php?topic=32548.0


Abbas Ali

What about overlay.gif? Do we need to create that image file or you forgot to attach it to the post?
Chief Geek at Ranium Systems

Stramm

thanks for the hint, I've totally forgotten about it

tantley

This is an excellent mod that works instantly.  ;D

I was very impressed that it only took about three minutes to download, install, and check for proper operation.

As a side note for future CPG versions, if this could be implemented (on or off) through the admin config options, it would be a great feature.

Thanks for writing and sharing this great feature!

xx-07

nifty little tweek...

is there a way to tie this into "members only" and remove this of logged in?

Stramm

Quote from: tantley on August 13, 2006, 08:17:38 PM
This is an excellent mod that works instantly.  ;D

I was very impressed that it only took about three minutes to download, install, and check for proper operation.

As a side note for future CPG versions, if this could be implemented (on or off) through the admin config options, it would be a great feature.

Thanks for writing and sharing this great feature!

Thanks :)
and it's scheduled to be in the next cpg version
http://forum.coppermine-gallery.net/index.php?topic=33176.msg154902#msg154902

Stramm

of course possible. Basically you compare the modified functions with the original ones. Copy the changes into the original function and pack them in a if/ else clause
if (!USER_ID){...}  //for the not logged in user

xx-07

a thought...

this gif overlay covers tnail and intermediat picture...

does it also cover full size image?

i have looked at this and it seems full size image is not covered... is this correct?

if true, how could we disable, in config, full size view for non registered users?

this way drive-bys could not access images until theytook the time to register...

thoughts?

xx-07

getting closer...

i have installed Full-Size Photos Access Control
http://forum.coppermine-gallery.net/index.php?topic=25010.msg117873#msg117873

now i am going to try to add this gif thing...

xx-07

ok added mod as directed...

i have image display problems...

i am using 'rainy day' theme ...

actual images show in the case of no larger size (original load was smaller than intermediate)

i have successfully added the "Full-Size Photos Access Control"

and there must be a conflict...

link to image with no large size in db:  http://www.wireservicefree.net/florist_image_exchange/displayimage.php?album=topn&cat=0&pos=17

link to image with large size in db: http://www.wireservicefree.net/florist_image_exchange/displayimage.php?album=random&cat=0&pos=-125

many thanks

xx-07

footnote:

images all work if logged in....

the blank images only seem to effect not logged in users...

also....

QuoteThis addition puts a transparent gif over the actual intermediate or fullsized image.

how do we switch between 'intermediate or fullsized'?

my goal is to have fullsized unrestrictes (no overlay.gif)

many thanks

Stramm

#11
As said, the gif overlay covers the intermediate and fullsize image. If you want to exclude one, then you don't copy the function in question to your theme.php (function theme_html_picture, function theme_display_fullsize_pic).

The fullsize access control plugin I'd say modifies one of the two functions (the one for the fullsize popup) as well - > again, either don't copy the fullsize popup function from the zip to your theme.php, modify it to include the plugins changes or modify the plugin. This is what I meant in my first post
QuoteIf however the two included functions are already in your theme.php
A plugin may add that function without you seeing it in the theme.php

edit: I've just tried the fullsize acvcess control plugin with 4 more other plugins and the transparent gif overlay.. all working smooth as butter

dragonwolf

I got the mod working for an admin user just fine, but all I get for normal users is a white image. I'm using the eyeball theme. Anyone got any ideas?

xx-07

--->normal users is a white image

this is what i have...

hmmm

xx-07

hey dragonwolf ...

try loadig an image that is smaller than your 'intermediate' as defined in config - i bet the image will show!

seems the intermediate sized images are getting lost...

i think the overlay mod somehow is not looking for 'intermediate sized images'...


dragonwolf

I uploaded a thumbnail image and it can be viewed. My intermediate size is set to 600. The uploaded images are 1800 x 1197 at full size. I also have the Full-Size Access control and I have full-size disabled for all users so I didn't put the function

theme_display_fullsize_pic()

into the theme.php

That didn't seem to make a difference.

xx-07

try to load a pic that is smaller than 600

i bet it will work -

dragonwolf

I set one to exactly 600 and it worked. If I have to, I can resize all pics 600, but if there's a code mod I can do that would be better.

xx-07

U and Me - seem to have the same problem...

this tweek is not looking for intermediate images for guest level perms...

please ntoe we are bidge phpBB 2.0.13

thoughts?

Fudgemaster

Thanks Stramm, works like a charm.
If I only knew how to edit the code to make this overlay thingamajigger to work
with this -> http://forum.coppermine-gallery.net/index.php?topic=33581
--
It's an insane world.. But I'm proud to be a part of it.