vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=192)
-   -   Disable Right Click On Everything (https://vborg.vbsupport.ru/showthread.php?t=137161)

Stunner 01-20-2007 10:00 PM

Disable Right Click On Everything
 
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

Code:

<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 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....9&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..

Zia 01-23-2007 07:54 AM

Does this hack(this thread) works wil all browser?
IE,Firefox,Opera ?



Quote:

Originally Posted by Sadie Frost (Post 1165151)
^ 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....9&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

Quote:

Originally Posted by TheBlackPoet (Post 1165164)
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.


All times are GMT. The time now is 06:32 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01183 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete