PDA

View Full Version : Disable Right Click On Everything


Stunner
21 Jan 2007, 20:04
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
21 Jan 2007, 20:21
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
21 Jan 2007, 20:45
Heh agreed

However its his first. so lets let him off :p

quadinfotech
21 Jan 2007, 20:52
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
22 Jan 2007, 06:29
Isn't it better to add the code in headinclude template rathar than 3 different template?

Sadie Frost
22 Jan 2007, 18:46
^ Yes that worked for me. Is there a way to modify this to only protect images?

I found this code: http://www.vbulletin.org/forum/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
22 Jan 2007, 19:03
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..

Zia
23 Jan 2007, 08:54
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: http://www.vbulletin.org/forum/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
23 Jan 2007, 23:10
Works with Firefox not sure about the other lamer browsers :)

o0Hubba0o
27 Jan 2007, 01:31
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
18 Mar 2007, 18:34
when we can rip a flash, what makes u think a simple text of image can't be done..

Atakan KOC
26 Mar 2007, 09:04
Thanks........

Mrdby
15 Apr 2007, 16:14
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
15 Apr 2007, 19:24
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
18 Apr 2007, 14:05
Thanks! ..*Installed* :up:

Mrdby
18 Apr 2007, 14:08
Maybe a hack to have it set to where admins and mods have it disabled?

The)TideHunter(
04 May 2007, 17:21
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 May 2007, 05:12
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
06 May 2007, 01:08
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
06 May 2007, 17:29
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
16 May 2007, 02:35
can it disable both hightlighted and right click? and i don't want the box "stunner says" to pop up