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

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

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.

Joachim Müller

Added this mod to devel branch of svn. This means that it will be available as a core feature (of course admin-settable) in cpg1.5.x.

Suggestions:
  • rename the file "overlay.gif" to something that makes it less obvious for end users that they are being tricked into believing that they are saving "the real thing". After all, this mod is trying to fool end users ;).
  • <?php $imagedata['geometry'] ?> won't do anything. It needs to be something like width:<?php echo $row['pwidth'] ?>px; height:<?php echo $row['pheight'] ?>px;

BTW: those who try to make their gallery standards-compliant should be aware that the HTML-attribute "background" is being considered deprecated. Therefor, applying this mod as-is will leave your gallery non-standards-compliant. You should then turn off the vanity blocks at the bottom as well. The reason for using the outdated background-attribute is obvious: if you used the standards-compliant method (using CSS attributes), some browsers would display a context menu entry "save background image", which would kick you back to square one.

Side-note: I have tested the mod in FF2, IE6 and Opera8.

Joachim

tiagobr


shef

This seems like a great mod.  I have added it to my theme.php but it is not working for me in Firefox.  No image displays at all in firefox but it works just fine in IE7.  Any ideas?  Help would be really appreciated.

uk_martin

Quote from: GauGau on December 09, 2006, 10:20:19 AM
Side-note: I have tested the mod in FF2, IE6 and Opera8.

Joachim
A slightly disturbing development is that a freely downloadable "Pictures Toolbar" plug-in to IE7 searches out and downloads all images to several levels of link distance from any given base URL, a bit like "Web Whacker" thus rendering this sort of protection a little less reliable.

A possible weakness is that it searches for user defined filetypes. Thus if there are JPG files there, then they will be downloaded. If there are no JPG files, then it won't. I wonder if it would ever be possible to rename JPG files when adding them into Coppermine, giving them a random file extension (fixed file extensions would become known and lose their security as a result) which could then be "decoded" back to JPG at the time when a request comes in to view the images?

In other words, If I had "airplane.jpg" to upload, then when it got added to the gallery, the file (and its normal / intermediate "relatives") would be renamed and stored as "airplane.xyz" / normal_airplane.xyz" (for example). Then if the Pictures toolbar was used, the files wouldn't be found, as it no longer has the jpg file extension. However when the picture is "called" in the Gallery, the system would know to temporarilly rename the file back to "airplane.jpg" for it to be recognised by the web browser.

Just an idea. I have no idea if it is actually possible as I am not a PHP programmer, but as I always say, the stupidest suggestion is the one that never gets made.

shef

Quote from: GauGau on December 09, 2006, 10:20:19 AM
Side-note: I have tested the mod in FF2, IE6 and Opera8.
Joachim

I can't get it to work in FF, is there anything I might be doing wrong?  It works fine in IE7

Joachim Müller


shef


shef


Stramm


shef


kiig

I had weird issues with some of my albums showing images correctly (after applying the functions) and other not showing the images.

Took me a while to figure out that

$imginfo=getimagesize($picture_url);

should be replaced by

$imginfo=getimagesize(urldecode($picture_url));

Don't know if that helps, - made a world of difference to me :-)

thanx.

Kim.
Kim Igel
http://igel.it (Personal playground) or http://foto.igel.it (Paypal shop-site)

Stramm

Quote from: shef on February 03, 2007, 06:59:36 PM
bump - it's back online now

can't check cause it doesn't seem you have the mod running

Fudgemaster

I've noticed that some users, mainly firefox, have been having trouble seeing .swf
files when this overlay hack has been applied to the theme in use.

Removing it or using a non hacked theme shows the .swf files perfectly,
but with the hack, only a blank white screen will show up.
Plugins/players are installed so the .swf itself works perfectly.

I really wouldn't like to remove that overlay from use just
because of one album having .swf in it.

some item from the album:
http://www.partanen.net/gallery/displayimage.php?pos=-24363
straight url to file itself:
http://www.partanen.net/gallery/albums/friday/003.swf
--
It's an insane world.. But I'm proud to be a part of it.

Apurbo

Thanx for This Nice Hack. I have successfully install it at http://apurbo.com . I cant understand how i can allow unregistered member to view photo ( Now, unregistered member can see a white screen rather than photo). I badly need the ans. I just need to protect download or save as Photo and want everybody even Guest can view All photo. I am a new wibe. Pls Help me..

Stramm

looks like you've installed some plugin that interfers with this mod

cgc0202

<b>Transparent gif overlay  mod and the CPMFetch mod</b>

I wanted to try this mod but the only issue is that it may mess up other mods.

For example, many of my existing galleries are displayed in other sites using the CPMFetch mod.  Briefly, this involves the  CPMFetch "interacting" with the images in the CPG database so that they are presented as screen viewable images in other pages.

In the aforementioned CPMFetch display procedure, is the process considered a "download" and thus, not allowed? 

I cannot try this simply because my photos are centralized and used by multiple galleries and in turn the multiple galleries are used by the  CPMFetch to integrate images in "gazillion" pages now.

Cornelio

Stramm


Apurbo

Quote from: Stramm on March 25, 2007, 02:45:58 PM
looks like you've installed some plugin that interfers with this mod

I just Use Full access control and Shoping busket mod. Pls Help me How i allow guest to view images?

Stramm

as said, the full size access control plugin interfers with this very mod. I never looked into the plugin you use so I can't tell you how to modify either the plugin or this mod to make them both work together.

As far as I can see the plugin grabs and modifies the html output (after this mod created it). Therefore the transparent overlay.gif is present but not the image itself in the table background. --> look up the part of the plugin code responsible for this and tell it not to remove the table setup with the image in the bg

cgc0202

Hi Stramm,

I tried the mod in one of my test galleries.  It worked but when you click on the thumbnail, it displays the full size image rather than the intermediate image..


To test this, I pasted the overlay text only on the theme.php of the "Supernova" theme but not in the others.

Here are some details:

PhotoGallery
vVPG1410-Strammmodpack

Please view the Classic (the themes options are at the bottom of the page) and click on one of the thumbnails.  Note that the intermediate and full size shows up; and neither are protected in the "Classic" theme.  If you now switch to the Supernova, a protected theme,   and then click on a thumbnail, the fullsize (and not the intermediate) image shows on the browser and  the popup.  The bright note is that the "overlay.gif" protection did work.

Cornelio