SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Member
    Join Date
    Apr 2014
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Can u help me this function?

    Copy protection, I want the function of this forum: http://diendanlequydon.com/viewtopic.php?p=1920896#p1920896 ... Can u help me ?

    test_zps19f4af3c.jpg

    Before Copy

    /To all: sorry moi nguoi. Hien tai Co hoi ban, bay gio Co chi beta thoi, nhung Co se co gang nho Soc edit 1 tuan/ 3 hoặc 4 chuong. Cam on moi nguoi da theo doi.

    After Copy and Paste:

    /To 76all: sorry 5moi nguoi. ca © DiendanLeQuyDon.comHien tai Co a2hoi ban, bay 86gio Co chi 3fbeta thoi, 18nhung Co se aco gang nho 9Soc edit 1 98tuan/ 3 hoặc f24 chuong. 02 © DiendanLeQuyDon.comCam on moi abnguoi da theo 85doi.
    Last edited by TechnoBear; Apr 19, 2014 at 03:22. Reason: URL delinked

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,161
    Mentioned
    190 Post(s)
    Tagged
    2 Thread(s)
    Hi cafe02xh, welcome to the forums.

    If you look at the page's view-source you'll see the function in it.
    Code HTML4Strict:
    function autoAddCopyright() {
        var bodyElement = document.getElementsByTagName('body')[0];
        //var selection;
        var selectionArea = window.getSelection();
        var pageLink = "<br />Xem thêm: <a href='http://diendanlequydon.com/viewtopic.php?f=142&t=296514'>http://diendanlequydon.com/viewtopic.php?f=142&t=296514</a>";
        var copyText = selectionArea + pageLink;
        var newDiv = document.createElement('div');
        newDiv.style.position='absolute';
        newDiv.style.left='-99999px';
        bodyElement.appendChild(newDiv);
        newDiv.innerHTML = copyText;
        selectionArea.selectAllChildren(newDiv);
        window.setTimeout(function() {
            bodyElement.removeChild(newDiv);
        },0);
    }
    document.oncopy = autoAddCopyright;
    Unless you mean this that looks to be done server-side prior to page rendering.
    Code HTML4Strict:
    .....
    <span style="font-size: 99.69%; color: #0f000e">Cam on moi </span>
    <span style="font-size: 2.7px; letter-spacing: -2.7px; color: #ebf6ff">4f</span>
    <span style="font-size: 99.79%; color: #01000e">
    <script language="javascript"> ttdecode('6e'); </script>
    guoi da theo </span>
    ......

  3. #3
    SitePoint Member
    Join Date
    Apr 2014
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, thank you

    Can you write css and java for that function? Can u help me >_<

  4. #4
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,161
    Mentioned
    190 Post(s)
    Tagged
    2 Thread(s)
    I'm fairly certain it's a WordPress plugin. Do you have WordPress?

  5. #5
    SitePoint Member
    Join Date
    Apr 2014
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Mittineague View Post
    I'm fairly certain it's a WordPress plugin. Do you have WordPress?
    Yes, I am using Wordpress and Vbb

  6. #6

  7. #7
    SitePoint Member
    Join Date
    Apr 2014
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you so much

    But ... i want to use that function for php or vbb.

    Do you know how to copy protection as that forum >_<

  8. #8
    SitePoint Zealot bronze trophy xMog's Avatar
    Join Date
    Mar 2011
    Posts
    145
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)
    This is a JavaScript, it is rendered in your browser (not on the server).
    Check this tutorial, it explains how to add it:
    http://www.hypergurl.com/norightclick.html

    Note : I really think it's a bad idea and a waste of time to try to add that kind of feature to a web site. Why? Somebody finds your text interesting and wants to copy it and send it to his email or paste it somewhere to promote something on your site and he'll get a message that feels like "Hey, I don't trust you".

    Second, it's so easy to disable JavaScript or just show the source of a page and copy the text from there that this method would only prevent people that knows almost nothing about the Internet to copy the text. And, this is often the people that just wants to send the text to themselves or their friends. If somebody copies content of other websites to put it on its own site, I'm sure he'll be able to disable that "child lock".

  9. #9
    SitePoint Member
    Join Date
    Apr 2014
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank xMog

    But I've followed your instructions and I still can't T__T

    Have you video tutorials?

  10. #10
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,161
    Mentioned
    190 Post(s)
    Tagged
    2 Thread(s)
    Have you tried all the plugins and not one works?
    Did the tutorial xMog suggested not help? What error messages do you get?

  11. #11
    SitePoint Member
    Join Date
    Apr 2014
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Reason: URL delinked, I send that url*again: http://diendanlequydon.com/viewtopic...20896#p1920896

    ******

    Hi Mitt

    This is link's xMog: http://www.hypergurl.com/norightclick.html but i can't do it

    ****

    Then i check that 4rum's css: http://diendanlequydon.com/styles/he...stylesheet.css

    .copyright {
    color: #ccc;
    font-weight: normal;
    font-size: 10px;
    line-height: 1.2em;
    }
    .copyright a, .copyright a:visited {
    color: #ccc;
    text-decoration: none;
    }
    .copyright a:hover { color: #0094FF; }

    .copyprotect, a.copyprotect, a.copyprotect:visited { font-size: 0.01px; color: #ffffff; letter-spacing: -1px; text-decoration: none; }
    And I copy that css in my stylesheet.css, but the function not work.


Bookmarks

Posting Permissions

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