Disable Right Click

Dj SharK

New Member
Looking for something that would disallow members from right click on the forum.

I've installed ( http://www.vbteam.info/vb-3-7-x-add...-disable-right-click-high-lighting-1-1-a.html ) but it applies for all users. I want to allow my admins & mods to be able to right click.

I did try ( http://www.vbteam.info/trash/2518-disable-right-click-your-forum.html ) as well but it doesn't work.

When i was on 3.6.8, there was a mod that allowed just that. Admins and mods could right click but all others are not allowed to. Problem is i don't remember the mod name.

Anyways, i'm on 3.7.2 so anything that's compatible would be great.

Thanks !
 
In your headinclude template find:
<!-- / CSS Stylesheet -->

below add:
HTML:
<!-- no right click -->
<script language="JavaScript1.2">
var message="YOUR MESSAGE HERE!";
function click(e)
{
  if (document.all)
  {
    if (event.button==2||event.button==3)
    {
      alert(message);
      return false;
    }
  }
  else
  {
    if (e.button==2||e.button==4)
    {
      e.preventDefault();
      e.stopPropagation();
      alert(message);
      return false;
    }
  }

}

if (document.all) // for IE
{
  document.onmousedown=click;
}
else // for FF
{
  document.onclick=click;
}
</script>
<script type="text/javascript">
function ehan( evnt )
{
  if( evnt.which == 3 )
  {
    alert( "YOUR MESSAGE HERE!" );
    return false;
  }
  return true;
}
function ocmh()
{
  alert( "YOUR MESSAGE HERE!" );
  return false;
}
document.oncontextmenu = ocmh;
document.captureEvents( Event.MOUSEDOWN );
if( document.layers ) document.onmousedown = ehan;
</script>

<!-- / no right click -->

now find:
YOUR MESSAGE HERE! (found 3 times) and add your own messege...
now when someone right clicks they will get an alert with your messege....
 
All users but you did say "...so anything that's compatible would be great" :)

its the same as whats on vbskinworks
 
Quick edit:
Wrap above code in this:

Code:
<if condition="is_member_of($vbulletin->userinfo, [color=Red]1, 2, 3[/color])">

<-- code goes here -->

</if>

change numbers to all your groups except admin and mods (normally 6 and 7).
 
Did everything as you mentioned but when i tried on my test account ( every usergroup except admins & mods ), i was still able to right click. Thanks for the help though. Appreciate that. :)
 
Back
Top