Results 1 to 6 of 6

Thread: Disable right click on Lighbox images

  1. #1
    Join Date
    Jan 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Disable right click on Lighbox images

    1) Script Title: Lightbox

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...box2/index.htm

    3) Describe problem: How can I disable right click on Lightbox images?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Don't bother. Even if you could, which you can't reliably across browsers, the images could still be copied - I'm assuming that's what you are trying to prevent.

    To stop your images from being copied, you must never publish them. However, if it is really just the matter of infringement that concerns you, publish away! Your images are protected by copyright.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jan 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I am not bothered about copyright but the privacy of my website users. I have a regional matrimonial website wherein users can publish their profile with photos. The users are concerned about their photos being easily accessible to everyone.

    I understand that even disabling r/click will not protect from photo theft but it would atleast minimize that.

  4. #4
    Join Date
    Jan 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi Kumwarbs,

    you can able to do this by disabling the right key selection for only selected browser but i always the image was copied in some way. But try this Javascript code it will disable the right selection options for IE.
    onselectstart="return false"
    var message="Right-mouse click has been disabled.";
    <script language=JavaScript>
    <!--
    var message="This text is copyrighted by Vanderhoof, LLC";
    function click(e)
    {
    if (document.all)
    {
    if (event.button==2||event.button==3)
    {
    alert(message);
    return false;
    }
    }
    else
    {
    if (e.button==2||e.button==3)
    {
    e.preventDefault();
    e.stopPropagation();
    alert(message);
    return false;
    }
    }
    if (e.which)
    {
    alert("oops Opera?")
    }
    }

    if (document.all) // for IE
    {
    document.onmousedown=click;
    }
    else // for FF
    {
    document.onclick=click;
    }
    // -->
    </script>

  5. #5
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    Even if you have a perfectly working no-right click code (which is not possible now as John mentioned) they can copy your images using lots of other means like screenshot takers, saving the page, etc..

    Once you put it in the site public can access these items without much trouble.

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    slimbox:

    http://www.digitalia.be/software/slimbox

    is a lightbox clone where the larger images displayed are background images behind transparent elements. That would effectively cut down greatly, if not completely on right clicking for image copying.

    But the images can easily be gotten via other means. You cannot both show someone's images and protect someone's privacy as regards them. To pretend to do so by disabling right click in this or any other manner would be more of a violation of those who are trusting you with their images than the actual taking of those images by others would be.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •