Support » Plugins » [Plugin: NextGEN Gallery] How to disable right click ?

  • Hi, guys!

    I installed NextGen Gallery and Lightbox2 and everything is working fine except 2 things.

    1.) How to disable rightclick menu on thumbnails and images (lightbox2) in NextGen Gallery? I do not want people to download the images from my blog.
    2.) If there are Flash objects on my blog, they do not darken when clicking on thumbnail. They are actually positioned above the image / LighBox view. Is there any way to fix that?

    Thank you,


Viewing 15 replies - 1 through 15 (of 24 total)
  • I had a similar problem with Flash objects a while ago, here’s the solution …

    Stephen Chapman wrote an interesting article on right click scripts a while back …

    Disabling right click is incredibly annoying and highly recommend finding an alternative solution.

    Thanks Ryan.

    Thsi solved the problem: <body oncontextmenu=”return false;”>

    Now I have to find out how to supress that flash object to be in background. What I’m using is that FlashFader plugin. Do I have to put it somewhere in the file within the plugin?


    Thank you so much ryanhellyer for this Stephen Chapman article – this is exactly what I too want to do.

    But I’m new to word press and I’m not exactly sure where the code goes? Into which php page?

    I do not want people to download the images from my blog

    That is practically impossible. As soon as the image is being displayed in your browser, the image has been downloaded alredy. By disabling the right click, you only make it a little harder for people to get to the image.

    where does the right-click Disable code go? Into which php page?

    Any help greatly appreciated…

    Like macbrink said, it is very easy to download pictures. For instances, there is a handy option in Firefox under “enable javascript” to prevent webdesigners like you from messing with our rightclick context menus. It’s not appreciated to mess with our browsers and probably won’t work anyway. If you want absolute security for your pictures, don’t put them on the Internet.

    Yes I know, but how do you do it with this code <body oncontextmenu=”return false;”>

    Where exaclty does it go within the php page – do I put this in index.php?




    if I want your pictures, I can take them, save this stupid hack for a day when you dont have anything else to do.

    Yes – But how do you disable it – on a word press blog?

    well…… if you really want to annoy your readers, change the <body> tag in header.php

    but, before you do, think of this:
    you also block your reader right-click ability to

    • add your site to favorites
    • print your page
    • open a link in another tab
    • refresh the page

    Thanks so much macbrink for your reply… I would like to disable the right-click on the NextGen gallery & image postings.

    You say change the <body> tag in header.php – but what do I change it to?

    Thanks again..Hope you & any others out there – can reply a.s.a.p.

    please read YOUR replies to this thread very carefully. You know the answer already

    Oh yes, many thanks Macbrink – I now added the body tag to head and it has worked – Photos “save as” are disabled, upon right click.

    Thanks so much.

    This is hysterical, in a sad way. own_wordpress had to ask 4 times for an answer as to where to put the little line of code. (thanks, macbrink for reminding us it is in the header.php, because I couldn’t find it either.)

    And the reason he/she had to keep asking is because everyone who replied hates to be stopped from copying images! Some of us make a living by making the images everyone wants. And steals.

    I just put this in my blog and love it. I like the way there is no java, as the pop-up can be annoying. It’s just a quiet, powerful NO! I KNOW there are workarounds for images. But it creates more work for the visitor. Why shouldn’t it be difficult to steal images?

    Thank you, ryanhellyer.

    Yes, it also makes it difficult to right click and quote – but the control-copy still works fine if someone needs to quote me.



    I think you’re hysterical, Drawer 🙂

    And the reason he/she had to keep asking is because everyone who replied hates to be stopped from copying images!

    Don’t you think this is being a little over dramatic?

    If someone really wants to copy your precious images, then they can do so. You just annoy the hell out of all your normal visitors. It’s all about usability nowadays, dude! You want your visitors to come back after all. Well, maybe you don’t!?

    A better way of dealing with this is to watermark your images with your homepage link. That way you might even get more visitors to your site. And don’t put high quality pics online. What’s someone going to do with a watermarked 640×480 or even 800x600px image?

Viewing 15 replies - 1 through 15 (of 24 total)
  • The topic ‘[Plugin: NextGEN Gallery] How to disable right click ?’ is closed to new replies.