I like this!
I just changed around some code, and added a bit of code for my needs.
My code gives the Usergroup a small message when they right click. I have Right-Click disabled for Guests, so when a guest tries to right click, the message they get is: "Right Click is Disabled for Guests!"
Here is my code, if anyone would like to use it:
Code:
<!-- Disable Right click for Usergroups Begin -->
<vb:if condition="is_member_of($bbuserinfo, 1,8)">
<body style="user-select: none; -khtml-user-select: none; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; -o-user-select: none;">
<script type="text/javascript">
function catch_click(e)
{
if (!e) var e = window.event;
var right_click = (e.which ? (e.which == 3) : (e.button == 2));
if (right_click)
{
alert('Right Click is Disabled for Guests!');
return false;
}
}
document.onmousedown = catch_click;
if (document.captureEvents) document.captureEvents(Event.MOUSEDOWN);
</script>
</vb:if>
<!-- Disable Right click for Usergroups End -->
Change the code in
RED to your liking. That's the message the Usergroups get when they Right Click, and the Usergroups that cannot right click.
All credit goes to the OP
da_judge, I just changed the code a bit. Thank You!!
If anyone wants to see the popup message before adding this code, go to my site and try it yourself. You dont need to login or anything, I have Disabled Right Click for Guests.
Demo: https://thetechgenius.net