We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25273
    • 13 Posts
    Hello,

    I’m new here and new to Modx.

    I’ve searched the forums and add-ons extensively but cannot find the info I want.

    I am thinking of disabling the right-click function on my webpage - to try to inhibit text and picture copying.

    Has anyone already done this in Modx? Or, do you have any ideas of the best way to do it?

    I know that there are various javascript code solutions. Anyone have any opinions if this is a good approach to adopt?

    I’ve also looked at tynt insight (http://www.tynt.com/) - although this will not disable it amends the right-click copy function to include a source backlink.
    Has anyone any experience of this utility in Modx? Is it a good idea or not?

    Any comments would be gratefully received.
      • 8609
      • 607 Posts
      This is not exactly an answer to your question, but the truth is that someone who is determined to copy your content won’t be deterred by disabling the right-click. Here’s an old but still interesting article on the topic: http://articles.sitepoint.com/article/dont-disable-right-click

        • 4310
        • 2,310 Posts
        I’ve done it with Javascript and added a copyright protected message in an alert box, but it’s pretty pointless really.
          • 25273
          • 13 Posts
          einsteinsboi, thanks for the link. smiley I’ll give that a good read.

          bunk58, can you give a link to a page where you have done this? I’m still looking around at various ideas, so it would be good to see how you’ve approached it grin
            • 4310
            • 2,310 Posts
            This is the link
            The copyright alert only works in IE.
              • 33238
              • 388 Posts
              My Friend... i.m using this code to show a copyright POP and disable right click!!

              just paste the code before close body in the HTML.
              ex:

              code...
              </body>


              here is the code:


              <script language=JavaScript>
              <!--
              
              //Disable right mouse click Script
              //By Maximus ([email protected]) w/ mods by DynamicDrive
              //For full source code, visit http://www.dynamicdrive.com
              
              var message="All content is copyrighted by YOUR COMPANY © !";
              
              ///////////////////////////////////
              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>
                --
                ysanmiguel.com
                • 25273
                • 13 Posts
                bunk58, thanks for the link. The popup works a treat. FYI, my main browser is Firefox 3.6.8 and the popup works for that.
                I’m particularly impressed by the range of language options shocked Are those google translations or have you had bespoke translations done?

                Ysanmiguel, many thanks for the code. I’ll give it a try. It’s always nice to have more than one option!

                After reading the article from the link given by einsteinsboi I’m trying to decide on the best action. Anyone here got any experience
                of using tynt.

                Thanks again to everyone who has taken the time to reply.
                  • 4310
                  • 2,310 Posts
                  Google translations via a jQuery/Google API mashup, not my work, done by Balazs Endresz
                    • 25273
                    • 13 Posts
                    bunk58, Thanks for the "translation" link - something else to put on my to-do list and investigate.
                      • 4310
                      • 2,310 Posts
                      something else to put on my to-do list and investigate
                      It only ever gets longer laugh