Please Help On Scripting

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Nite Producer
    Lieutenant Colonel

    • May 2006
    • 593

    Please Help On Scripting

    Hi scriptors,

    Please follow the situation and find the questions in the bottom:

    Situation:
    I want to protect my pages from right click and PrintScreen SysRq

    I found the following scripts in web site but they didn't work

    In the first one which is to disable the keyboard, it said put it in the Head section of the page:

    <SCRIPT LANGUAGE?JavaScript1.1?>
    <!-- Begin DigitalJustice.com Protection
    function keypressed() {
    alert("Sorry, but you can't do that.");
    }
    document.onkeydown=keypressed;
    // End -->
    </SCRIPT>

    In the second which is to disable right click, it said put it right above the body tag:

    <script language=JavaScript>
    <!--
    var message="Copyright Nite Production!";
    function click(e) {
    if (document.all) {
    if (event.button == 2) {
    alert(message);
    return false;
    }
    }
    if (document.layers) {
    if (e.which == 3) {
    alert(message);
    return false;
    }
    }
    }
    if (document.layers) {
    document.captureEvents(Event.MOUSEDOWN);
    }
    document.onmousedown=click;
    // -->
    </script>

    Questions:
    1 - are these scripts rights? if no can anyone provide me with?
    2 - In Blue Voda, when I right click in the page, I find Page HTML, is there where should I put these scripts? if yes which tags? if no where, and how?

    Thanks in advance
    The Producer
  • FPRob
    Colonel

    • Aug 2006
    • 955

    #2
    Re: Please Help On Scripting

    NitePro... Can you leave this with me for 10 mins.... I think I can fix it but Im goign to have to install it on a webpage and check it out?

    FPRULES


    Comment

    • FPRob
      Colonel

      • Aug 2006
      • 955

      #3
      Re: Please Help On Scripting

      OK This will disable the right click mate... I am working on one for the keyboard too. Although, are you sure you want to do that? Many visitors will asume that you r website has made their keyboard lock up and will not visit again.

      How to disable the right mouse click..... (before you click, see my next post, below)

      Enter the following code in the <HEAD> of each page that requires the 'no right click'. Then download this file (click the link) from my server and place it in the same place as your index page (before you click, see my next post, below). http://www.fprules.com/files/norig***lick.js

      Code:
      <script type="text/javascript" src="norig***lick.js"></script>
      Notes...

      1) This will only work on pages that are in the root directory (where you index page is). If you have pages inside folders let me know and I will give you a couple of more instructions mate.

      2) This code only works for Internet Explorer. It is some code that I had hanging around and have not been able to modify for other browsers. Neither apparantly has the original author of the code.

      3) Disabling the right click is not a full proof way to protect you pics etc. If people want them they will find a way to get them even if they cant right click

      4) Those who have JavaScript disabled in their browser will still be able to right click with no problems.

      FPRULES


      Comment

      • FPRob
        Colonel

        • Aug 2006
        • 955

        #4
        Re: Please Help On Scripting

        I just realised... When you click the link.. the file might not download. It might display as code on your screen.

        If this happens, copy and paste the code to a TEXT DOCUMENT (.TXT) save it as

        norig***lick.js

        Then put that file into the same place as your index page

        FPRULES


        Comment

        • zigzag
          Captain

          • Apr 2006
          • 206

          #5
          Re: Please Help On Scripting

          I have just tried these 2 scripts above, and they work. Or certainly give the specified message anyway. I can't comment on whether they are a good idea or not.

          The first one I pasted in the "Between Head Tag".
          The second, I put in "Beginning of Body"

          Regards
          Royden

          www.harrow-art.com
          www.harrow.co.za

          Comment

          • FPRob
            Colonel

            • Aug 2006
            • 955

            #6
            Re: Please Help On Scripting

            The problem with the original code pasted by NP is that it is quite a few lines of code. Adding it to each page will increase the page loading times, not significantly but every millisecond you can shave off has to be a good thing.

            Using my code above which isnt much different does the same thing in a different way.

            all of the script ios in a single file (norig***lick.js) This file is called by every page that had the single line of code that I supplied.

            because each page is only having a single line of code added, hardly anything, infact probably nothing, is added to the page loading time.

            :)

            FPRULES


            Comment

            • zigzag
              Captain

              • Apr 2006
              • 206

              #7
              Re: Please Help On Scripting

              NP, you can see your code in action by going to ...

              FPRob is correct in saying that it is strictly better to 'call' the code from each page. Although this code is so small, that if you are prepared to paste it into every page, and you don't have a lot of pages - then the choice is yours.
              Royden

              www.harrow-art.com
              www.harrow.co.za

              Comment

              • Nite Producer
                Lieutenant Colonel

                • May 2006
                • 593

                #8
                Re: Please Help On Scripting

                Thank you FPRob, thank you zigzag,

                Actually I'm using this just temporary, but normaly I don't care about this stuff. My copyrights are more better, because all my stuff I publish are copyrighted, if anyone would like to use them, so I'll see him in the court defenitely I'll be winner and then I'll retire :)))
                The Producer

                Comment

                • FPRob
                  Colonel

                  • Aug 2006
                  • 955

                  #9
                  Re: Please Help On Scripting

                  <agrees> NitePro's original code and the one that ZigZag is using will not add much to your page loading times. It certainly wont be noticeable.

                  FPRULES


                  Comment

                  • Nite Producer
                    Lieutenant Colonel

                    • May 2006
                    • 593

                    #10
                    Re: Please Help On Scripting

                    Nice one zig zag, but I still could copy it by pressing the print screen botton in my keyboard
                    The Producer

                    Comment

                    • Nite Producer
                      Lieutenant Colonel

                      • May 2006
                      • 593

                      #11
                      Re: Please Help On Scripting

                      Allright, so I'll give it a go then
                      The Producer

                      Comment

                      • FPRob
                        Colonel

                        • Aug 2006
                        • 955

                        #12
                        Re: Please Help On Scripting

                        NP.. honestly.. you dont want to disable keyboard funtions if you can help it.

                        Heres a good idea.... when you finalise your music (I assume that whatyou are trying to protect) add an authentic note (in soundforge or whatever prog you are using). this note will accompnay all downloads and stay attached to the song forever. it is no guarantee that people wont rip you off but it is protection for you if it ver does come to a legal procedding.

                        also, its worth noting that the biggest record companies on the planet cannot stop their music being distributed. You are definitely fighting an impossible battle.

                        FPRULES


                        Comment

                        • Nite Producer
                          Lieutenant Colonel

                          • May 2006
                          • 593

                          #13
                          Re: Please Help On Scripting

                          it's not the music I want to protect first because the music is not mine, but I'm not saying I don't have the right to publish it, I have totaly the right to do so, I don't care about that because you can find it anywhere else. I'm just testing something. It's ok

                          You remember when I posted to give opinion about my logo?

                          click in my url and check that out.

                          don't post your opinion here, I'll will post another thread about it, you'll find it soon
                          The Producer

                          Comment

                          • zigzag
                            Captain

                            • Apr 2006
                            • 206

                            #14
                            Re: Please Help On Scripting

                            Nite Producer, that is your code on my ... indexExp url
                            Royden

                            www.harrow-art.com
                            www.harrow.co.za

                            Comment

                            Working...
                            X