Support » Fixing WordPress » how to disable Right Clicking on my site

  • ericwmartin

    (@ericwmartin)


    Right now when you click on an image on my website you can ‘view image’ and it opens it bigger in another window. Also on my before/ after sliders when you right click it there is a link to the products page.

    I instead want it to be where whenever you right click anywhere on my website it comes up with something saying All Rights Reserved or my own message.

    Is this possible/ how?

    link to my site http://www.EricWMartin.com

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter ericwmartin

    (@ericwmartin)

    this would be sweet 🙂

    Thread Starter ericwmartin

    (@ericwmartin)

    anyone know if its possible?

    BeautyPirate

    (@beautypirate)

    <script language=JavaScript> var message="Function Disabled!"; function clickIE4(){ if (event.button==2){ alert(message); return false; } } function clickNS4(e){ if (document.layers||document.getElementById&&!document.all){ if (e.which==2||e.which==3){ alert(message); return false; } } } if (document.layers){ document.captureEvents(Event.MOUSEDOWN); document.onmousedown=clickNS4; } else if (document.all&&!document.getElementById){ document.onmousedown=clickIE4; } document.oncontextmenu=new Function("alert(message);return false") </script>

    Put that in your <head> area. No warraties 😉

    Thread Starter ericwmartin

    (@ericwmartin)

    Whao it worked!!!! Thank you thank you thank you!!! 🙂

    Thread Starter ericwmartin

    (@ericwmartin)

    hmmm it still doesnt work on one of my plugins- in my ‘Before and After’ page I am using a flash plugin. when you right click on the flash image it still functions and my message doesnt pop up instead. Do I just create a new head in this page? or where do I insert that code for this page to do the same thing?

    Thread Starter ericwmartin

    (@ericwmartin)

    also sometimes when you right click there is a box to ‘prevent this page from preventing additional dialogs’ and if you check that box, then the right click feature is eneable again allowing you to view the image in another window. i dont want people to have the option, so 1. how do i remove that option. 2. why does that option not come up all the time?

    mrmist

    (@mrmist)

    Seriously?

    Disable-right-click is one of the most utterly pointless and obtrusive things you can do with a web site.

    It’s pointless because it’s massively easy to circumvent in a number of ways, and it’s obtrusive because you are conflicting with the normal usage pattern of the end user in their broswer, who should be free to browse in whatever way they see fit.

    If you don’t want your images stolen, then you either put up an image that is of too low a resolution to be useful for print media, or you place a watermark on it, or you don’t put it up online at all. But what you shouldn’t do is put whacky no right click script on your web site, as if you were off of a decade ago.

    Thread Starter ericwmartin

    (@ericwmartin)

    seriously? all that talk and no answer? why did you bother?

    I’m not worried about them getting stolen, had you looked you would have seen they are not that big of size anyways and I do have watermarks..

    As it is, imo its very tacky when you right click on the flash image and there is a direct link to the products provider. I would think to higher clients that would look very ugly and if anything deter rather than attract at all. Disabling right click is a very clean, professional way of dealing with several problems at once here.

    so all personal reasons and otherwise wasteful-in-all-ways kind of chit chat, how do I go about doing the above? (that this here forum is actually for)

    I’m wondering if using Beauty Pirates code somewhere in the plugin files or the settings.xml file that its using? i shall try that tonight if no better responses come up.

    also about it occasionally going away and giving the user the option to ‘prevent this page from preventing additional dialogs’, could this be a part of Beauty Pirates code? Or something somewhere else?…

    Thanks in advance to all help!

    mrmist

    (@mrmist)

    Apparently because I used too many words you missed my message, which was “don’t mess with the browser”.

    You cannot effectively disable right-click without the users being able to work around it in a number of ways. If you want to try, there are any number of scripts around on the web for you to try with, since the ridiculous practice of disabling right click has been around for donkey’s years.

    The error messages that you occasionally see will be because various advances in browser security and compliance (the right-click button often being used to initiate accessibility options and suchlike) mean that active scripting to disable context menus can be seen as essentially malware, so browsers give the user the option to not run such scripts.

    And no, I didn’t actually look at your site, because the concepts involved here overreach any one particular site or design style.

    Member

    (@luizsear)

    Sorry for the offtopic, but mrmist are you the forum moderator? You are able to edit a post?

    Im trying to talk with the administration but i didnt found where.

    thank you

    esmi

    (@esmi)

    @username: It is not forum policy to edit posts except in extreme circumstances. And time, please post your own topic.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘how to disable Right Clicking on my site’ is closed to new replies.