jasonh1234 Posted July 31, 2003 Share Posted July 31, 2003 I've installed this contribution and it's cool and all, but does anyone know if it could be modified to block Opera as well? Also how would one modify this so that the code affects enlarged product image java pop up windows as well? The contribution is basically... Paste this into your catalog/includes/header.php <script language=javascript> <!-- Begin function right(e) { var msg = "Right-clicking is not possible in this document."; if (navigator.appName == 'Netscape' && e.which == 3) { alert(msg); return false; } else if (navigator.appName == 'Microsoft Internet Explorer' && event.button==2) { alert(msg); return false; } return true; } document.onmousedown = right; // End --> --> </script> Quote Link to comment Share on other sites More sharing options...
Guest Posted July 31, 2003 Share Posted July 31, 2003 [Moved] to proper Contributions forum This forum is for giving Tips and Tricks The_Bear Quote Link to comment Share on other sites More sharing options...
jasonh1234 Posted July 31, 2003 Author Share Posted July 31, 2003 [Moved] to proper Contributions forumThis forum is for giving Tips and Tricks Oops. My bad. Sorry. For the record... if anyone else is interested... To protect your enlarged images... Just add this to catalog/popup_image.php <script language=javascript> <!-- Begin function right(e) { var msg = "Right-clicking is not possible in this document."; if (navigator.appName == 'Netscape' && e.which == 3) { alert(msg); return false; } else if (navigator.appName == 'Microsoft Internet Explorer' && event.button==2) { alert(msg); return false; } return true; } document.onmousedown = right; // End --> --> </script> ...to the bottom below: <?php require('includes/application_bottom.php'); ?> Quote Link to comment Share on other sites More sharing options...
JH Posted August 1, 2003 Share Posted August 1, 2003 :shock: Use the above code... but before right clicking and getting the annoying alert message (not your fault), click your middle mouse button as if to use the auto-scroller then right-click. It defeats the effort and still allows you to capture what ever you have previously highlighted. I hate the pesky right-click monster too. I did not try too much, but if there was another function other than the alert message, this would be more attractive (although it would still have the same defeat as outlined). Thanks for the effort. It is appreciated. Quote Link to comment Share on other sites More sharing options...
only2empires Posted August 3, 2003 Share Posted August 3, 2003 Here is a code that you can't use the middle mouse button then right click. I have tested it and it works. It is also invisible, no annoying box pops up. <script language=JavaScript> <!-- //Disable right click script III- By Renigade ([email protected]) //For full source code, visit http://www.dynamicdrive.com 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> Quote Link to comment Share on other sites More sharing options...
only2empires Posted August 3, 2003 Share Posted August 3, 2003 Adding onto the previous post: This does not prevent them if they get the small box that gives them the option to "save, print, email, or open in pictures folder." There is no full proof option. They can even do a "Print Screen" and paste your page in MS Paint and then crop it out and save. Nothing is really YOURS anymore! Good Luck! Quote Link to comment Share on other sites More sharing options...
JH Posted August 3, 2003 Share Posted August 3, 2003 Thanks for the "non-box" right click prevent. I agree, there is no way to stop the relentless stuff grabber. However, the code above will prevent to casual stuff grabber. Thanks again. 8) Quote Link to comment Share on other sites More sharing options...
♥monte22 Posted August 3, 2003 Share Posted August 3, 2003 FYI, the disable right click mod is completely worthless. If someone wants your images, they are going to get them. It is far easier to simply drag them to the desktop then to right click and get them. All this mod is going to do is upset some potential customers who accidentally click the right button, and have to go and close a pop-up button. Not to mention many people actually use the right click button to navigate the web. People like things to work they way they are used to. When you start making it difficult for people to browse your site, I guarantee they will not stay around long enough to buy something. If you don't want you images stolen I suggest checking out the following thread. http://www.oscommerce.com/forums/viewtopic.php?t=41128 Good luck! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.