The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hi peeps
I want to be able to prevent peeps from using the Right Click Menu, to limit/restritc peeps nicking stuff of me site, I have found this code (below) Where would i put it, or is there something else i can do? Regards Bashy Code:
<!-- TWO STEPS TO INSTALL NO RIGHT CLICK: 1. Copy the coding into the HEAD of your HTML document 2. Add the last code into the BODY of your HTML document --> <!-- STEP ONE: Paste this code into the HEAD of your HTML document --> <HEAD> <SCRIPT LANGUAGE="JavaScript1.1"> <!-- Original: Martin Webb (martin@irt.org) --> <!-- This script and many more are available free online at --> <!-- The JavaScript Source!! http://javascript.internet.com --> <!-- Begin function right(e) { if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2)) return false; else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3)) { alert("Sorry, you do not have permission to right click."); return false; } return true; } document.onmousedown=right; document.onmouseup=right; if (document.layers) window.captureEvents(Event.MOUSEDOWN); if (document.layers) window.captureEvents(Event.MOUSEUP); window.onmousedown=right; window.onmouseup=right; // End --> </script> </HEAD> <!-- STEP TWO: Copy this code into the BODY of your HTML document --> <BODY> <center>[ Try right-clicking the image and then the text link below ] <p> <img src="http://javascript.internet.com/img/tjsbutton.gif"> <p> <a href="http://javascript.internet.com">Text Link</a> <p><center> <font face="arial, helvetica" size="-2">Free JavaScripts provided<br> by <a href="http://javascriptsource.com">The JavaScript Source</a></font> </center><p> <!-- Script Size: 1.57 KB --> |
#2
|
|||
|
|||
![]()
The best way to prevent clicks would be:
<body onload="self.close()"> That'll have the same exact effect on your board's users as if the clicks are simply disabled ![]() |
#3
|
|||
|
|||
![]()
Cheers Psionic
Where exactly would this be placed? Bashy |
#4
|
|||
|
|||
![]()
That would be placed in all templates that have a <body> tag, instead of the one they currently have.
|
#5
|
|||
|
|||
![]()
Sounds like a bit of work involved then
![]() Thought it might have just been 1 edit, although.... My forum is situated inside my portal, so in effect couldnt i just do this to the portal and the others would be effected because of this? |
#6
|
||||
|
||||
![]() Quote:
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="WARNING! No portion of this website may be reproduced, copied, or transmitted in any form or by any means, except as a normal browser download without prior written permission from the publisher, except for usage allowed by the Fair Use provisions of the Digital Millennium Copyright Act.\n\nCopyright ? Your Name. All rights reserved."; /////////////////////////////////// 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> |
#7
|
|||
|
|||
![]()
Thats brill, thanks alot
![]() Happy New Year Regards Bashy |
#8
|
||||
|
||||
![]() Quote:
![]() |
#9
|
|||
|
|||
![]()
If you didnt already get it, Psionic Vision was being sarcastic. Preventing the right click menu is the worst behaviour you could possibly add to your site, and youll find any tech-saavy users will immediatly be turned off your site.
There are ways around such "restrictions". You wont be stopping anyone from stealing your content. |
#10
|
||||
|
||||
![]()
i need to disable right click to certain forums any chance on doing this???? Can someone please help me
many thanks |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|