Jump to content
WebFlake

Disable Right Click For Guests


-Cookie-

Recommended Posts

  • 2 months later...
On 12/12/2015 at 1:13 AM, wurm123 said:

work this with 4.1?

To use this with 4.1 you have to add the code in the pageHeader instead.

<if test="IPSMember::isInGroup( $this->memberData, array(2) )">
<script language=JavaScript>
var message="You Must Log-in before you can use Right Click!";

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>
</if>

 

Link to comment
Share on other sites

  • 1 month later...
On 27.02.2016 at 10:18 AM, DarKMaSk said:

I want no one except admins would be able to right click on any page in the entire forum. Please guide me where and what I have to change in the above mentioned script and where I have to put this script in which page? Please help.

if ($this->memberData['member_id'] != 4)

 

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...
  • 2 months later...
  • 1 month later...
×
×
  • Create New...