PDA

View Full Version : Forum Display Enhancements - Disable Select and Right click


Silver Boy
03 May 2008, 23:03
somebody doesn't like to someone copy text and picture of their forum.
this codes help them to solve this problem

Disable Select in board

add this code in header of style:


<!------ disable Select ------->
<head>
<meta http-equiv="Content-Language" content="en-us">
</head>
<script language="JavaScript1.2">
<!--
function disableselect(e){
return false
}
function reEnable(){
return true
}
//if IE4+
document.onselectstart=new Function ("return false")
//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
// -->
</script>
<!------ /disable Select ------->



Disable mouse right click in IE and Firefox (I didn't check for othere explorer, maybe work)
add this code in header of style:


<!------ disable right click ------->
<script language="JavaScript">
<!--

var message="";
///////////////////////////////////
function clickIE()

{if (document.all)
{(message);return false;}}

function clickNS(e) {
if
(document.layers||(document.getElementById&&!document.all))
{
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else
{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")
// -->
</script>
<!------ /disable right click ------->



Update : Deleted "disable right click in IE" for no confusion

koolfire
03 May 2008, 23:21
Disabling Right click code thing doesn't wokr

Tried this on 3.6.8

Silver Boy
04 May 2008, 08:26
work in IE,
but I was update anothere code that work correctly in 3.7.x with IE and Firefox browser (maybe work with othere browser)
enjoy https://www.vbulletin.org/forum/external/2008/05/60.gif

beduino
04 May 2008, 17:39
hi
i install to test and ...
[last code]
works in iexplorer 7
don't work in ffox
tks
beduino

Silver Boy
04 May 2008, 21:26
hi
i install to test and ...
[last code]
works in iexplorer 7
don't work in ffox
tks
beduino

did you use Disable mouse right click in IE and Firefox ? (I think u used disable right click only in IE)
I was Delete "disable right click in IE" for no confusion

just use first code for disable selecting
and use seconde code for disable right click

sure that work correctly https://www.vbulletin.org/forum/external/2008/05/60.gif

Jase2
04 May 2008, 22:52
Seen too many of these. Simply turning javascript off in your browser makes this completely useless, unfortunately.

Chris-777
05 May 2008, 01:49
This is just plain old JS, not really a vB mod at all.

Mike-D
08 May 2008, 20:46
To be honest: Disabling right clicking makes no sense and does not really protect. It's really simple to avoid this. Anyone who's determined to copy your content or code will do so regardless of his or her ability to bring up a browser context menu. If they want your source code then it's as simple as selecting 'View Source' from the main menu. The needed or searched text can be highlighted and copied. Also images and media presentations can be retrieved from the cache and streaming media can be recorded. Disabling right-click will only make people more determined to learn exactly what it is you're hiding. And this could end up being counter-productive, as your images and source code attract unwanted attention. Not only that, but you can only disable right-click on browsers that have JavaScript enabled! This means: A visitor only has to turn off JavaScript in their browser's options to be able to ignore the script altogether!

Don't forget: Firefox provides users an easy way to stop these common Javascript annoyances! Also most Firefox users does have the Firebug Addon installed. Using this makes the cracking Javascript code more easier! Only a well meant advice :) -Mike

RvG2
25 Aug 2008, 05:08
thanks for the code... I need this in some parts of the board.

Hostboard
25 Aug 2008, 15:10
To be honest: Disabling right clicking makes no sense and does not really protect. It's really simple to avoid this. Anyone who's determined to copy your content or code will do so regardless of his or her ability to bring up a browser context menu. If they want your source code then it's as simple as selecting 'View Source' from the main menu. The needed or searched text can be highlighted and copied. Also images and media presentations can be retrieved from the cache and streaming media can be recorded. Disabling right-click will only make people more determined to learn exactly what it is you're hiding. And this could end up being counter-productive, as your images and source code attract unwanted attention. Not only that, but you can only disable right-click on browsers that have JavaScript enabled! This means: A visitor only has to turn off JavaScript in their browser's options to be able to ignore the script altogether!

Don't forget: Firefox provides users an easy way to stop these common Javascript annoyances! Also most Firefox users does have the Firebug Addon installed. Using this makes the cracking Javascript code more easier! Only a well meant advice :) -Mike

This is just meant to make someone work for it instead of making it easier.

raja811
21 Nov 2008, 00:45
Thanks Worked 3.7.3

LyleS
27 Nov 2008, 00:23
This is the best thing since crunchy peanut butter!

Michael.A
05 May 2009, 23:49
CTRL A to Select THEN CTRL C to copy

does not work if u think this can stop member for copying you post's

nomoreturn
06 May 2009, 10:29
I add both code in head 3.8.2

merkaz
06 May 2009, 16:39
So Nice ..

lm3a.net
20 May 2009, 10:45
Does it work with opera ?

thanks,

nomoreturn
27 May 2009, 04:43
How i can disable this code in Posting area or in edit area i can't copy paste in posting area ( where we right our post ) or in edit area please help ti fix it thanks