Announcement

Collapse
No announcement yet.

Right-click image protection

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Right-click image protection

    Is there a way to do this? My members post pics of their kids, etc and want to make sure that when you right-click on the image, something comes up saying 'cannot right-click' or right-click is just simply disabled - is this a vbulletin thing or a hosting thing? TIA!

  • #2
    It can be done with some javascript added to your header template, but you do know that it's very easy to get around that and save the images anyway, right?
    vBulletin v3.8.0's Implementation of Google Adsense Should Be Avoided At All Costs - Do Your Own Adsense Implementation

    Comment


    • #3
      You can add this code in the <body> tag:

      Code:
      <body oncontextmenu="javascript: return false;">

      Comment


      • #4
        Originally posted by conqsoft
        but you do know that it's very easy to get around that and save the images anyway, right?
        that's EXACTLY what i said to my co-admin but they said it gives the members a feeling of security - i know if someone wants a pic, they are going to get it..

        Comment


        • #5
          Originally posted by hoangminh
          You can add this code in the <body> tag:

          Code:
          <body oncontextmenu="javascript: return false;">
          just add it after the <body> tag? in which template?

          Comment


          • #6
            If you only want to disable right click on content of thread (post), place that code in body tag of SHOWTHREAD template:

            Code:
            ...
            </head>
            <body onload="$onload" oncontextmenu="return false;">
            $header
            $navbar
            ...

            Comment


            • #7
              i am sorry - i think you lost me - i want to disable right-click on images in the threads - is that what you mean?

              Comment


              • #8
                the script I 've posted will disable right-click on the whole page /showthread.php?...., of course it also disables right click on image.

                If you only want to disable right click on Images, I think you should edit a lot code in /includes/function_bbcodeparse.php (at IMG code handle)

                Comment


                • #9
                  oh okay! seems like that is the easiest way to go then - thank you!!

                  Comment


                  • #10
                    worked like a charm!!! thank you so much!

                    Comment


                    • #11
                      Originally posted by hoangminh
                      If you only want to disable right click on content of thread (post), place that code in body tag of SHOWTHREAD template:

                      Code:
                      ...
                      </head>
                      <body onload="$onload" oncontextmenu="return false;">
                      $header
                      $navbar
                      ...
                      The above code works perfect as advertised but it does not work when I go to the same thread (that you can't right click on) but then go to Thread Tools>Show Printable Version. It does let me right click and copy all of the text. So my question is how can I keep people from right clicking on the Show Printable Version? I want to allow people to print the text just not copy and paste it.

                      Anyone?

                      Comment


                      • #12
                        Apply the same changes in the printthread template.
                        Best Regards
                        Colin Frei

                        Please don't contact me per PM.

                        Comment


                        • #13
                          Thanks Colin, that worked but I did some more testing with both of them and I figured out Windows XP defeats the code. If you highlight the code and then just run the mouse over it (and let the mouse sit idle for just a second) XP gives you an option to copy it and it does in fact copy it.

                          Any ideas on how to defeat that one?

                          Comment


                          • #14
                            Nope, no idea.

                            On the other hand, as said above, it's easy to copy the image if you know how anyhow, so I think that doesn't make such a difference.
                            Best Regards
                            Colin Frei

                            Please don't contact me per PM.

                            Comment


                            • #15
                              If it makes any difference, I don't care about images because I can watermark them, I am just trying to protect some of my text.

                              Anyone on the XP issue?

                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...
                              X