Page 1 of 1

Transparent GIF to protect from downloads

Posted: 01 Oct 2008, 01:33
by tfluegge
Is there a way to add a transparent gif to the HTML code to prevent users from right clicking and downloading an image off the HTML site?

Where/which file would I do this if possible?

Thanks,
Tom

Posted: 04 Oct 2008, 07:50
by Nick
Hmm it would save pictures only from totally unexperienced users, anyway, in imagevue/templates/index_html.phtml you can find:
Code
<span style="background: url('<?php echo ivFilepath::safe($item->getThumbRelativePath()); ?>') center center no-repeat; width: <?php echo $maxThumbWidth; ?>px; height: <?php echo $maxThumbHeight; ?>px;" ></span>
Thats how image is being displayed. You should probably change it to:
Code
<span style="background: url('<?php echo ivFilepath::safe($item->getThumbRelativePath()); ?>') center center no-repeat; width: <?php echo $maxThumbWidth; ?>px; height: <?php echo $maxThumbHeight; ?>px;" >
<img src="empty.gif" width="<?php echo $maxThumbWidth; ?>" height="<?php echo $maxThumbHeight; ?>" />
</span>
Something like that.

Posted: 04 Oct 2008, 12:06
by tfluegge
this appears to put a transparent gif over the thumbnail on the html page...what about over the full image (i.e. after clicking the thumbnail, the imagepage that comes up)?
pain wrote:Hmm it would save pictures only from totally unexperienced users, anyway, in imagevue/templates/index_html.phtml you can find:
Code
<span></span>
Thats how image is being displayed. You should probably change it to:
Code
<span>
<img>
</span>
Something like that.

Posted: 07 Oct 2008, 07:32
by Nick
Ah right, over image, well, same idea - change img to div with background and put img on top, this will require some css changes too, I'll give you example bit later if you don't mind.