Divinum Fiat
Well-known member
Hi all,
There is an archived thread here about disabling right-click, but unfortunately the script is only for guests. I need to have right-click disabled even for members.
I know many disagree with this tactic but given topics and confidentiality of our forums this is a must (most of our visitors also would have not clue how to disabled this function). I've installed a script through Tynt to see how many pages are being copied (and which ones) and it's amazing at what's being "taken."
The script I have now is this. Can anyone tell me which part I need to change so that right-click is disabled for everyone?
Thank you!
There is an archived thread here about disabling right-click, but unfortunately the script is only for guests. I need to have right-click disabled even for members.
I know many disagree with this tactic but given topics and confidentiality of our forums this is a must (most of our visitors also would have not clue how to disabled this function). I've installed a script through Tynt to see how many pages are being copied (and which ones) and it's amazing at what's being "taken."
The script I have now is this. Can anyone tell me which part I need to change so that right-click is disabled for everyone?
Code:
<xen:if is="!{$visitor.user_id}">
<script type="text/javascript">
<!--
//Disable right mouse click Script
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com
var message="Right click is disabled for guests!";
///////////////////////////////////
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>
</xen:if>
Thank you!