Back to vBulletin 4.x Template Modifications

Disable Right Click For User Groups
Mod Version: 1.00, by da_judge

vB Version: 4.x.x Rating: (5 votes - 4.00 average) Installs: 20
Released: 23 Feb 2014 Last Update: Never Downloads: 0
Not Supported Template Edits Re-usable Code  

This is a simple modification for your header template.

Not sure if this been posted before but though i would share it.

You can prevent chosen usergroups from using right click or ctrl+c etc

To Install is very simple, open your header template and paste code below at the top.

You must add the usergroups you want to stop using right click, separated by a comer

Code:
<vb:if condition="is_member_of($bbuserinfo, 1,2,3)">
<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 language="javascript" type="text/javascript">
document.oncontextmenu=RightMouseDown;
document.onmousedown = mouseDown; 
function mouseDown(e) {
    if (e.which==3) {//righClick
    }
}
function RightMouseDown() { return false; }
</script>
</vb:if>

Tested in Internet Explorer, Firefox and Chrome

Download

No files for download.


vblts.ru supports vBulletin®, 2022-2024