How do you do this with pictures?

Is that not just a Lightroom gallery?
 
The hard part of your question is stopping people from saving your images.
Any piece of code such as the one that disables right-click is usually easily circumvented.
 
The hard part of your question is stopping people from saving your images.
Any piece of code such as the one that disables right-click is usually easily circumvented.

Well basically I have a shoot in a few weeks of up to 80 people. So I want them to log into my site etc to view their picture and then let me know what they want, if any.

The images will already be watermarked, but I would still like just a basic 'no right click save'
 
Hi Rob Add this to the body of your page

Code:
<script language=JavaScript>
<!--

//Disable right click script III- By Renigade (renigade@mediaone.net)
//For full source code, visit http://www.dynamicdrive.com

var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")
// --> 
</script>

HTH

Dave
 
Hi Rob Add this to the body of your page

Code:
<script language=JavaScript>
<!--

//Disable right click script III- By Renigade (renigade@mediaone.net)
//For full source code, visit http://www.dynamicdrive.com

var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")
// --> 
</script>

HTH

Dave

Does this work with all browsers? I was building a site at the beginning of the year and was experimenting with disabling right click and pretty much all I tried didn't work in FF and Opera, gave up in the end :shrug:
 
That's ok but it doesn't prevent a screen shot.
 
That's ok but it doesn't prevent a screen shot.

No it does, but the images are going to be small and watermarked, so wouldn't be much use to the customers lol

I would like a script that activates when a right click has been done saying

"WARNING, THEFT!! POLICE ARE ON THEIR WAY"
 
Did you get your .htaccess password working in the end?
 
Did you get your .htaccess password working in the end?

I actually found a script on the domain to use in the end...similar to the .htaccess....all sorted thank god! :-D

Slowly getting there
 
Try this then:-

Save this file as nrc.js and place it in your web directory.

function right(e){
if(navigator.appName=='Netscape'&&(e.which==3||e.which==2))
return false;
else if(navigator.appName=='Microsoft Internet Explorer'&&(event.button==2||event.button==3)){
warning =
" !!! Warning !!!\n" +
"____________________\n" +
"\n" +
"Attempted photo theft, \n" +
"the police have been \n" +
"alerted and are on their \n" +
"way! \n" +
"\n" +
"Click OK and send me an \n" +
"e-mail telling me you \n" +
"want my photo. \n" +
"\n" +
"Copyright 2010 \n" +
"Robbo Photography \n" +
"\n" +
"Thank you\n" +
"____________________\n"

var agree = confirm(warning);

if (agree !="0"){
top.location="mailto:webmaster@your.com?subject=I want to order a photo";}
return false;}
return true;}
document.onmousedown=right;
document.onmousemove=right;

insert your own name and email address

Then on every page you wish to 'protect' put the following immediately below the <head>

<script src="nrc.js"></script>
 
sorry, gap between 'w' and 'h' in 2nd "which" needs closing - formatting error in my post!
 
No it does, but the images are going to be small and watermarked, so wouldn't be much use to the customers lol

I would like a script that activates when a right click has been done saying

"WARNING, THEFT!! POLICE ARE ON THEIR WAY"

I wouldn't put this message in case a potential customer right clicks on the image by accident, possily no sense of humour :) Better in my opinion would be "this image is copyrighted by ****** "

Just my 2p's worth matey :thumbs:
 
I wouldn't put this message in case a potential customer right clicks on the image by accident, possily no sense of humour :) Better in my opinion would be "this image is copyrighted by ****** "

Just my 2p's worth matey :thumbs:

It would be funny for those with a sense home humor though.... Hmmm, that counts my fiancée out lol
 
No it does, but the images are going to be small and watermarked, so wouldn't be much use to the customers lol

I would like a script that activates when a right click has been done saying

"WARNING, THEFT!! POLICE ARE ON THEIR WAY"

I believe that sort of thing is considered bad practice. Some people legitimately use the context menu, why would you want to p**s of some of your visitors with a rude notice?

I found a neat javascript that permitted right click on text but put up a dialog box when used over images.
http://www.wilmingtoncameraclub.co.uk
Still really bad practice, though.

As you've already said, make the pics small and with a watermark. You can't do more. Otherwise, don't make them available that way. Make viewing appointments with your clients and do it direct.

Just my thoughts on this, fwiw.
 
Last edited:
Carol, the theft warning bit was in jest :-)

I have an up coming shoot of approx 100 kids 5 pictures each, so I need it all online for viewing purposes etc as trying to get around a possible 100 clients could be hard lol

It's near enough all sorted :-)
 
I found a neat javascript that permitted right click on text but put up a dialog box when used over images.
http://www.wilmingtoncameraclub.co.uk
Still really bad practice, though.

This goes back to my point further up the thread, about different browsers I use Chromium browser and can right click on images and save them from your link, although only small images can still be done.

@Robbo

If you have found a solution that will work for all browsers I would be interested to know.
 
Back
Top