Post by nasrul89 » Tue Dec 14, 2010 11:24 pm

I want to turn off the mouse right click function on my browser when opening the site OpenCart to protect the image by copying others.
I found the script below, but I am confused where to place it ... please help.

This script, if the scripts are correct, I also do not know. ??? ??? ???

<script language=JavaScript>
<!–

var message=”Function Disabled!”;

///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function(”alert(message);return false”)

// –>
</script>


examples of websites that disable right-click mouse functions: http://www.butik-gaya.com/

User avatar
Newbie

Posts

Joined
Tue Dec 14, 2010 12:45 pm

Post by Qphoria » Wed Dec 15, 2010 12:17 am

This is a complete waste of time. People are smart enough now to just disable javascript and then they can click anything they want. disable right click scripts haven't worked since 1999.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by SapporoGuy » Wed Dec 15, 2010 12:22 am

Add it to the header.tpl

However, You still can get to your images by:
1.) view page source, then copy paste ... here is a link http://www.butik-gaya.com/images/ANTING ... BIRUcp.jpg

Is that your site?

930sc ... because it is fun!


User avatar
Active Member

Posts

Joined
Mon Nov 01, 2010 7:29 pm

Post by nasrul89 » Wed Dec 15, 2010 12:25 pm

at least to reduce the risk of copy-paste the image and people can not see our source page.

mr. SapporoGuy and mr. Qphoria
thanks for the help and info. :D

User avatar
Newbie

Posts

Joined
Tue Dec 14, 2010 12:45 pm

Post by SapporoGuy » Wed Dec 15, 2010 3:50 pm

You should look into watermarking your images if you are that worried.

930sc ... because it is fun!


User avatar
Active Member

Posts

Joined
Mon Nov 01, 2010 7:29 pm

Post by scr33ky » Mon Dec 20, 2010 10:41 am

Well .. i tryed watermarking.... made the mod.. from the instructions on the forum.. my employer even payed 13 $ for a decent watermark module and afterwards ..LOL he decided that the overall look is ruined by the watermarking ..... because if you have other images besides the products on the page .. like manufacturere logos.. they will tend to override them aswell.. that and some image sizes differ on the image sourece.. that can have some unexpected results aswell.. i managed to install a "right-click disable"script in the catalog/view/theme/default/template/common/header.tpl

just before the </head> tag in the header.tpl
add this script

Code: Select all

//--></script>
<SCRIPT LANGUAGE="JavaScript">
var message="Right Click Deactivated !";
///////////////////////////////////
function clickIE() {if (document.all) {alert(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {alert(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>
DEMO: http://www.magazin-scule.ro

Sure it might not do the job in all situatons but at least it will make it harder for others to right click .... at least try to discurage the right click behavior of the people that visit your site

Well good luck all hope i helped ..

New member

Posts

Joined
Mon Nov 29, 2010 4:25 am

Post by KuriN » Sat Feb 26, 2011 10:07 pm

Is there a way to disable the selection on your store? Nomatter text or picture.

http://www.parfumi.net/catalog/yves-sai ... -5258.html
- Like here... try to select the text...

Thanks

New member

Posts

Joined
Mon Jan 31, 2011 6:15 pm

Post by SapporoGuy » Sat Feb 26, 2011 10:38 pm

I still think this is a waste of time since those who will want to protect images or text, since you still can get them through google search or Safari/Chrome by opening the debugger. View source is a way to get text.

930sc ... because it is fun!


User avatar
Active Member

Posts

Joined
Mon Nov 01, 2010 7:29 pm

Post by smorelli » Fri Apr 01, 2011 5:41 am

Not to mention, they can just to a screen print and crop up the image.

New member

Posts

Joined
Wed Jan 27, 2010 6:28 am
Who is online

Users browsing this forum: No registered users and 24 guests