...

View Full Version : stop visitors from dragggin pics to their desktop



sixrfan
10-09-2009, 10:37 PM
i have a site where i want to take steps to block visitors from taking pictures from the site. yes, i know its impossible to fully block this from happening. but the visitors to this type of site arent that web savvy so...

anyway, i've put in javascript code to stop people from right clicking and saving the images. however people can still left click on an image, hold the mouse button down, then drag it to their desktop. any ideas on how to stop protect against this?

thanks!

Fumigator
10-09-2009, 10:53 PM
It's a futile effort, but you may be able to work something out using jQuery's UI and the "draggable" function, say, put a callback function on the "start dragging" event which pops up an alert box saying "please don't steal my art".

http://jqueryui.com/demos/draggable/

Fumigator
10-09-2009, 11:27 PM
I was curious how well this would work and come to find out it works quite well. You'll need to use the files I attached to see it in action. (I would upload the test page somewhere but I'm not at home)



<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>

<head>
<title>Drag Alert Test</title>

<meta http-equiv="content-type" content="text/html;charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css" >
<style type="text/css">
.warning {
padding: 20px;
width: 450px;
border: 10px solid #900;
background-color: #000;
font-size:2em;
font-weight:bold;
color:#f00;
}
</style>
<script type="text/Javascript" src="jquery-1.3.2.min.js"></script>
<script type="text/Javascript" src="jquery-ui-1.7.2.custom.min.js"></script>
<script type="text/Javascript">

$(function() {
$("#draggable").draggable({
revert: true,
opacity: 0.7,
cursor: 'progress',
cursorAt: { top: -12, left: -20 },
helper: function(event) {
return $('<div class="warning">You are illegally attempting to steal my copyrighted stuff. STOP IT!</div>');
},
//stop: function() {
// alert("Don't even try it, sucka!");
//}
});
});

</script>
</head>
<body>

<div id="draggable" class="ui-widget ui-widget-content">
<img src="img/test.png" />
</div>

</body>
</html>

tomws
10-10-2009, 12:23 AM
I wonder if a transparent overlay div would work for this. Granted, it's extra code and can get sloppy underneath. I've never tried it myself - never thought of it before.

BubikolRamios
10-11-2009, 06:58 PM
look here:
http://www.slo-foto.net/galerija_slika-56031.html

they have transparent jpg, and you can't drag as far as I can see.

effpeetee
10-12-2009, 03:40 PM
It's yours. (http://exitfegs.co.uk/snapit.jpg)

The transparent png (http://www.exitfegs.co.uk/transparent.gif) is easily dragged to your desktop, that is if you want a transparent png.

Frank

seco
10-12-2009, 04:11 PM
there is no way to keep people from taking anything on the net. I would just skip this part and move on.

tomws
10-12-2009, 04:21 PM
there is no way to keep people from taking anything on the net. I would just skip this part and move on.

You may have missed this:


yes, i know its impossible to fully block this from happening. but the visitors to this type of site arent that web savvy so...

seco
10-12-2009, 05:05 PM
its a 50/50 toss up for non web savvy these days. In the past ive done somthing along the lines of


<img src="blank.gif" style="background: url(photo.jpg);" />

of course it needs more attributes but thats the best way with the least work, you just dont want to use JS cause if its disabled its not helpfull.

oesxyl
10-12-2009, 05:18 PM
i have a site where i want to take steps to block visitors from taking pictures from the site. yes, i know its impossible to fully block this from happening. but the visitors to this type of site arent that web savvy so...

anyway, i've put in javascript code to stop people from right clicking and saving the images. however people can still left click on an image, hold the mouse button down, then drag it to their desktop. any ideas on how to stop protect against this?

thanks!
try this:
http://www.htaccesstools.com/hotlink-protection/

best regards

IamHe
10-13-2009, 06:52 PM
i think the best, quickiest and easiest way is just to set the image as a background.

insert a table without a border and 00 padding and spacing, set it to the size you want and set your table background as the image.

cant be dragged , or right clicked and saved.

can however be screenshoted and the url can be found in the scource,
but you could put a watermark over, block right clicks, and dsguise the section of the scource code....... with aload of ///note mumbo jumbo , and usless javascript codes.

but to my knowledge theres no way to completeley stop people taking images unless you can disable screenprint.

hope this helps



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum