+ Reply to Thread
Results 1 to 14 of 14

Thread: Please Help On Scripting
      
   

  1. #1
    Nite Producer's Avatar
    Nite Producer is offline Lieutenant Colonel
    Join Date
    May 2006
    Location
    Saratoga, Central Coast
    Posts
    594

    Cool 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

  2. #2
    FPRob's Avatar
    FPRob is offline Colonel
    Join Date
    Aug 2006
    Location
    Near some trees
    Posts
    955

    Default 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?

  3. #3
    FPRob's Avatar
    FPRob is offline Colonel
    Join Date
    Aug 2006
    Location
    Near some trees
    Posts
    955

    Default 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.

  4. #4
    FPRob's Avatar
    FPRob is offline Colonel
    Join Date
    Aug 2006
    Location
    Near some trees
    Posts
    955

    Default 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

  5. #5
    zigzag's Avatar
    zigzag is offline Captain
    Join Date
    Apr 2006
    Location
    Durban, South Africa
    Posts
    206

    Default 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

  6. #6
    FPRob's Avatar
    FPRob is offline Colonel
    Join Date
    Aug 2006
    Location
    Near some trees
    Posts
    955

    Default 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.

    :)

  7. #7
    zigzag's Avatar
    zigzag is offline Captain
    Join Date
    Apr 2006
    Location
    Durban, South Africa
    Posts
    206

    Default Re: Please Help On Scripting

    NP, you can see your code in action by going to ...
    http://www.harrow-art.com/indexExp.html
    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.

  8. #8
    Nite Producer's Avatar
    Nite Producer is offline Lieutenant Colonel
    Join Date
    May 2006
    Location
    Saratoga, Central Coast
    Posts
    594

    Default 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

  9. #9
    FPRob's Avatar
    FPRob is offline Colonel
    Join Date
    Aug 2006
    Location
    Near some trees
    Posts
    955

    Default 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.

  10. #10
    Nite Producer's Avatar
    Nite Producer is offline Lieutenant Colonel
    Join Date
    May 2006
    Location
    Saratoga, Central Coast
    Posts
    594

    Default 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

  11. #11
    Nite Producer's Avatar
    Nite Producer is offline Lieutenant Colonel
    Join Date
    May 2006
    Location
    Saratoga, Central Coast
    Posts
    594

    Default Re: Please Help On Scripting

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

  12. #12
    FPRob's Avatar
    FPRob is offline Colonel
    Join Date
    Aug 2006
    Location
    Near some trees
    Posts
    955

    Default 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.

  13. #13
    Nite Producer's Avatar
    Nite Producer is offline Lieutenant Colonel
    Join Date
    May 2006
    Location
    Saratoga, Central Coast
    Posts
    594

    Default 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

  14. #14
    zigzag's Avatar
    zigzag is offline Captain
    Join Date
    Apr 2006
    Location
    Durban, South Africa
    Posts
    206

    Default Re: Please Help On Scripting

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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49