How to prevent people steal images while using fancybox with ease

October 5, 2010 § 4 Comments

Some will look for right click disable, but using mac will just need to drap and drop the image is done.

So I suggest we can do a transparent overlay on top of the fancybox plugin.

But wait! They already got two of them!
they are fancybox-left and fancybox-right, navigations.

Simply go to fancybox.css for modification.

Look for

#fancybox-left, #fancybox-right {
....
}

Edit the width from 35% to 50%, then there is no room for anyone to right click for the real image while cannot be drag and drop!

Advertisements

Tagged: ,

§ 4 Responses to How to prevent people steal images while using fancybox with ease

  • Brad says:

    this works well except in the cases of the first and last photo when there is no left or right arrow to cover the image

  • Martin says:

    This is how I did it when calling the fancybox function:

    $(document).ready(function() {
    $(“[rel=’single_1′]”).fancybox({
    openEffect : ‘elastic’,
    closeEffect : ‘elastic’,
    nextEffect : ‘elastic’,
    prevEffect : ‘elastic’,
    beforeShow: function () {
    /* Disable right click */
    $.fancybox.wrap.bind(“contextmenu”, function (e) {
    return false;
    })
    $.fancybox.wrap.bind(“dragstart”, function (e) {
    return false;
    })

    ;}
    });
    });

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

What’s this?

You are currently reading How to prevent people steal images while using fancybox with ease at Nick Wan L.K..

meta

%d bloggers like this: