help! I need a codemonkey - stat
Moderator: Forum Moderators
-
- Zombie
- Posts: 2101
- Joined: February 20th, 2005, 21:31
help! I need a codemonkey - stat
I manage to do most things in my travels into html, php etc, however this one has stumped me. I need to offer basic protection to reduce image stealing. On inital inspection i thought it would be easy. But not so apparently.
I need a no-right-click script or method that works in Internet explorer (with SP2 installed), and doesnt pop up that yellow bar at the top:
"to protect your computer, internet explorer has restricted this file from showing active content that could access your computer. Click here for options..."
Even the simple tag thing is blocked. Im not sure this is classed as "active content"!
<body oncontextmenu="return false;">
Any help would be awesome!
I need a no-right-click script or method that works in Internet explorer (with SP2 installed), and doesnt pop up that yellow bar at the top:
"to protect your computer, internet explorer has restricted this file from showing active content that could access your computer. Click here for options..."
Even the simple tag thing is blocked. Im not sure this is classed as "active content"!
<body oncontextmenu="return false;">
Any help would be awesome!
-
- Heavy
- Posts: 5433
- Joined: October 10th, 2004, 17:36
- Location: Bristol, UK
- Contact:
Have you tried using a javascript such as this one?
Code: Select all
<script language="Javascript1.2">
// (C) 2003 CodeLifter.com
// Source: CodeLifter.com
// Do not remove this header
// Set the message for the alert box
am = "This function is disabled!";
// do not edit below this line
// ===========================
bV = parseInt(navigator.appVersion)
bNS = navigator.appName=="Netscape"
bIE = navigator.appName=="Microsoft Internet Explorer"
function nrc(e) {
if (bNS && e.which > 1){
alert(am)
return false
} else if (bIE && (event.button >1)) {
alert(am)
return false;
}
}
document.onmousedown = nrc;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (bNS && bV<5) window.onmousedown = nrc;
</script>
-
- Zombie
- Posts: 2101
- Joined: February 20th, 2005, 21:31
-
- Badger
- Posts: 101
- Joined: November 30th, 2004, 17:26
i have no idea how to do this, however imho its not a great idea. ive only seen one script that actually worked recently, and that was on putfile.com. it was very irritating.
my two cents: a no rightclick script will simply irritate visitors (no open in new window in IE, and probably no new tab in firefox), and it wont stop anyone who is at all determined to get their hands on an image. hotlinking protection might help a little, but imho theres not a huge amount you can do.
my two cents: a no rightclick script will simply irritate visitors (no open in new window in IE, and probably no new tab in firefox), and it wont stop anyone who is at all determined to get their hands on an image. hotlinking protection might help a little, but imho theres not a huge amount you can do.
-
- Turret
- Posts: 8090
- Joined: October 13th, 2004, 14:13
- Location: The house of Un-Earthly horrors
A random and rather innefficient way you *could* do it would be to embed all the pictures into flash. Course, they could allways just download the flash file, but it makes it a little bit more difficult for them.
You may be able to put some actionscript in the flash to check where it is, and if its not on your site, to not show the image. Dont ask me how though.
Course, if they really, really want the image, they can just take a screenshot. Not a lot you can do to stop that, though.
You may be able to put some actionscript in the flash to check where it is, and if its not on your site, to not show the image. Dont ask me how though.
Course, if they really, really want the image, they can just take a screenshot. Not a lot you can do to stop that, though.
-
- Zombie
- Posts: 2101
- Joined: February 20th, 2005, 21:31
i have kind of blocked them already (other than screenshot), by having a transparent image over the top of the image, so when they save it they get a blank thing.
However, ideally we want to tell them to buy the prints. Otherwise they will d/l the blank, and not realise. Only to loose impulse to buy them, when later they realise teir pics dont exist.
We want to tell them there and then to consider buying a print.
putfile & thesun have working system to a certain extent, however when ive lifted the java, it is blocked! They must have something to get around the block that i have missed. Anyone?
However, ideally we want to tell them to buy the prints. Otherwise they will d/l the blank, and not realise. Only to loose impulse to buy them, when later they realise teir pics dont exist.
We want to tell them there and then to consider buying a print.
putfile & thesun have working system to a certain extent, however when ive lifted the java, it is blocked! They must have something to get around the block that i have missed. Anyone?
-
- Robotic Despot
- Posts: 4595
- Joined: October 14th, 2004, 21:35
- Location: Sitting in a tin can
- Contact:
Just have a low res version on the site, if they want good quality they have to pay for it, or watermark the imagesProfHawking wrote:i have kind of blocked them already (other than screenshot), by having a transparent image over the top of the image, so when they save it they get a blank thing.
However, ideally we want to tell them to buy the prints. Otherwise they will d/l the blank, and not realise. Only to loose impulse to buy them, when later they realise teir pics dont exist.
We want to tell them there and then to consider buying a print.
putfile & thesun have working system to a certain extent, however when ive lifted the java, it is blocked! They must have something to get around the block that i have missed. Anyone?
-
- Zombie
- Posts: 2101
- Joined: February 20th, 2005, 21:31
If someone wants an image they will get it. You're sending the image data to their computer anyways aren't you.
Anything availible through the right click menu is available other places in the UI, and disabling right click can be more of a fustration than anything (plus Javascript can be disabled).
They can view source and then find the actual image location on your server, avoiding any stuff you may have put on the page.
One way to stop this might be to put all your images in a private directory (use chmod on apache) and then let a php script feed them to your webpage, in the proccess checking that it is being delivered as part of a page and not on its own. I think you can use $_SERVER['PHP_SELF'] to check the name of the page being used to access the image. You might also be able to do this using .htaccess on Apache servers.
The embeding in flash is quite a good idea, but it does require quite a bit of work, seeing as you'll have to do it for each image.
In the end nothing will stop someone detirmined from nicking an image, a nice big watermark will ruin anyone's chances of getting a good quality image, so this is probably your best bet.
Anything availible through the right click menu is available other places in the UI, and disabling right click can be more of a fustration than anything (plus Javascript can be disabled).
They can view source and then find the actual image location on your server, avoiding any stuff you may have put on the page.
One way to stop this might be to put all your images in a private directory (use chmod on apache) and then let a php script feed them to your webpage, in the proccess checking that it is being delivered as part of a page and not on its own. I think you can use $_SERVER['PHP_SELF'] to check the name of the page being used to access the image. You might also be able to do this using .htaccess on Apache servers.
The embeding in flash is quite a good idea, but it does require quite a bit of work, seeing as you'll have to do it for each image.
In the end nothing will stop someone detirmined from nicking an image, a nice big watermark will ruin anyone's chances of getting a good quality image, so this is probably your best bet.
-
- Zombie
- Posts: 2101
- Joined: February 20th, 2005, 21:31
yes yes i know i cant stop them getting the image if they really want to. but thats not the idea
I just want to remind them to buy it!
Whatever fancypants scripts/flash/noclick used nothing stops the all powerful print-screen anyway.
Already the images are marked, They have to register & They are behind a transparent image.
But need the warning alert to tell them again. These are thick people i hear, and tight as a chinamans eye
I just want to remind them to buy it!
Whatever fancypants scripts/flash/noclick used nothing stops the all powerful print-screen anyway.
Already the images are marked, They have to register & They are behind a transparent image.
But need the warning alert to tell them again. These are thick people i hear, and tight as a chinamans eye