The Arcive of vBulletin Modifications Site. |
|
Disable right click on your forum. Details »»
|
|||||||||||||||||||||||||
This script taken from dynamic drive will disable the right click on your forum for guests. As to offer some protection to your materials being stolen from your forum.
Note: This will prevent them only for the right click and copy/paste directly. Anyway, add the following code to the very begin of the headinclude template. Code:
<vb:if condition="$show['guest']">
<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>
</vb:if>
Code:
var message="Right click is disabled for guests!"; Code:
Right click is disabled for guests! Show Your Support
|
|||||||||||||||||||||||||
| 2 благодарности(ей) от: | ||
| misericorde | ||
| Comments |
|
#2
|
|||
|
|||
|
This disable and the "CODE" "/CODE" .....?
|
|
#3
|
||||
|
||||
|
I am not sure what you are asking. This will disable the ability to use the right click at your forum for all the guests.
|
|
#4
|
||||
|
||||
|
...what about ctrl+c???...
|
|
#5
|
||||
|
||||
|
This disables only the right click.
I will look into it. |
|
#6
|
||||
|
||||
|
Why bother ?
When the context menu has been disabled like this it can be easily re-enabled by typing javascript:void oncontextmenu(null) into the address bar of the browser. View source code in nearly every browser. Opera ignores no right clicks anyhoo. All you will do is piss people off |
|
#7
|
||||
|
||||
|
You got a point TimberFloorAu. There is no 100% of preventing that but we might as well try to make them work harder
|
|
#8
|
||||
|
||||
|
LOL
You should do the javascript version. When they right click they get a warning, if they do it again : it will redirect them to a porn site ! |
|
#9
|
|||
|
|||
|
how do i set it so no one can do it ?? for certain user groups
|
|
#10
|
||||
|
||||
|
Replace the code with this one:
Code:
<vb:if condition="is_member_of($bbuserinfo, 1,2,3)">
<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>
</vb:if>
And change the gids 1,2,3 with your own usergroups ids that you don''t want to use the right click function at your forum. |
![]() |
|
|