View Full Version : Disable Right Click On Everything
Stunner
01-20-2007, 10:00 PM
I was searching DynamicDrive.com and came across this nifty little code. It will disable ANYONE from saving images from your site and will COMPLETELY disable ALL right clicks. So it has Pro's & Cons. I use this mostly on html pages I make off the forum. Just searching in the html for </head> and pasting below it the code provided.
Simply go to
ForumDisplay Templates>Forum Display>Search for "</head>"
&
ForumHome Templates>Forum Home> Search for "</head>"
&
ShowThread Templates>Showthread>Search for "</head>"
and below it paste
<script language=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="The Stunner Says: Nice Try!";
///////////////////////////////////
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>
Save
Do the same for Forum Home and Show Thread templates.
Thanks to Dynamic Drive (http://www.dynamicdrive.com/dynamicindex9/noright.htm) for the code.
To edit the message simply search for "var message" and edit my custom message.
This is my first time posting a mod so go easy on me.:p
Moparx
01-21-2007, 07:21 PM
This doesn't stop anyone from taking your images.
The only thing this will do is piss your members and guests off and cause them to leave.
Distance
01-21-2007, 07:45 PM
Heh agreed
However its his first. so lets let him off :p
quadinfotech
01-21-2007, 07:52 PM
here's a little tip that almost everyone knows:
if you come across any site that gives u that pop up telling you "Nice Try!" just answer back
"You Too!" go to your browser's options and turn off javascript.That will take care of it.
This is real easy on FireFox as it has the option sitting right there,
Don't use IE/Don't know how.
thanx for the share, Nice try!
Mudvayne
01-22-2007, 05:29 AM
Isn't it better to add the code in headinclude template rathar than 3 different template?
Sadie Frost
01-22-2007, 05:46 PM
^ Yes that worked for me. Is there a way to modify this to only protect images?
I found this code: https://vborg.vbsupport.ru/showpost.php?p=430219&postcount=10 but you have to add an onclick to the body of every template you want to protect and the entire page has to load before it works.
:)
Edit: Found some code here that worked for me: http://www.dynamicdrive.com/dynamicindex9/noright2.htm
:)
TheBlackPoet
01-22-2007, 06:03 PM
i need something like this for my poetry site.... so people will have a more difficult time stealing poetry... but then.. my members need it when they cut and paste... so i cant use it... but its a good thought..
Does this hack(this thread) works wil all browser?
IE,Firefox,Opera ?
^ Yes that worked for me. Is there a way to modify this to only protect images?
I found this code: https://vborg.vbsupport.ru/showpost.php?p=430219&postcount=10 but you have to add an onclick to the body of every template you want to protect and the entire page has to load before it works.
Edit: Found some code here that worked for me: http://www.dynamicdrive.com/dynamicindex9/noright2.htm
:)
does it work with all browser?
IE,FireFox,Opera
Stunner
01-23-2007, 10:10 PM
Works with Firefox not sure about the other lamer browsers :)
o0Hubba0o
01-27-2007, 12:31 AM
i need something like this for my poetry site.... so people will have a more difficult time stealing poetry... but then.. my members need it when they cut and paste... so i cant use it... but its a good thought..
Don't need to right click to cut/paste text, just highlight the text (hold left mouse button down and drag) then:
Ctrl C: Copy
Ctrl V: Paste
This code is good for people without a lot of knowledge of browsing the web, but people who have been around for awhile will know how to bypass this as you've seen from posts here. Nice find none the less and might help out some people.
momo2
03-18-2007, 05:34 PM
when we can rip a flash, what makes u think a simple text of image can't be done..
Atakan KOC
03-26-2007, 08:04 AM
Thanks........
Mrdby
04-15-2007, 03:14 PM
I know phpbb had it so only admins and whoever they select in the acp would be able to right click. I'm sure someone could work on this hack.
peterpigman
04-15-2007, 06:24 PM
This doesn't stop anyone from taking your images.
The only thing this will do is piss your members and guests off and cause them to leave.
^^^^ What he said.
HeRmAn'S
04-18-2007, 01:05 PM
Thanks! ..*Installed* :up:
Mrdby
04-18-2007, 01:08 PM
Maybe a hack to have it set to where admins and mods have it disabled?
The)TideHunter(
05-04-2007, 04:21 PM
Not hard to get round this tbh.
If its text your after, and theres no way of copying it, just look at the source in notepad and get it from there.
If its anything, such as images, flash movies, simply go to your temporary internet files and get them from there.
This may stop the common internet user, but not everybody.
basskiller
05-05-2007, 04:12 AM
Don't need to right click to cut/paste text, just highlight the text (hold left mouse button down and drag) then:
Ctrl C: Copy
Ctrl V: Paste
This code is good for people without a lot of knowledge of browsing the web, but people who have been around for awhile will know how to bypass this as you've seen from posts here. Nice find none the less and might help out some people.
not if you disable the keyboard also
like seen here
http://www.basskilleronline.com/duel-training.shtml
MeMySelfNi
05-06-2007, 12:08 AM
here's a little tip that almost everyone knows:
if you come across any site that gives u that pop up telling you "Nice Try!" just answer back
"You Too!" go to your browser's options and turn off javascript.That will take care of it.
This is real easy on FireFox as it has the option sitting right there,
Don't use IE/Don't know how.
thanx for the share, Nice try!
I tried that today and it worked. No need for this hack.
rossco_2005
05-06-2007, 04:29 PM
not if you disable the keyboard also
like seen here
http://www.basskilleronline.com/duel-training.shtml
then you can do to Edit in the menu bar and click copy, or view the source. :P
giotmuadong
05-16-2007, 01:35 AM
can it disable both hightlighted and right click? and i don't want the box "stunner says" to pop up
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.