vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Mini Mods - Disable right click on your forum. (https://vborg.vbsupport.ru/showthread.php?t=237481)

BadgerDog 06-22-2011 10:57 AM

1 Attachment(s)
Interesting idea, but doesn't work well in newer browser version ... ;)

For example, FireFox 4.01 shows the "block" as in the pic attached, but if the user clicks the checkbox shown, the block doesn't work from then onwards. :D

Anyway, would be great to have mod like this that would be more effective in blocking guests from capturing copyrighted pics.

Regardless, thanks to the developer here for his efforts in posting this one .. :up:

Regards,
Doug

apaydin2148 01-30-2012 08:35 PM

with this script you can disable text selection. like in the first post you must copy into top of headinclude template. enjoy. :)

Code:

<vb:if condition="is_member_of($bbuserinfo, 1,2,3)">
<script type="text/javascript">
    function returnFalse(e){
      return false;
    }

    function cancelEvent(e){
      if(e.preventDefault)e.preventDefault();
      else e.returnValue=false;
    }

    function addHandler(e,event,action,param){
      if(document.addEventListener)e.addEventListener(event,action,param);
      else if(document.attachEvent)e.attachEvent('on'+event,action);
      else e['on'+event]=action;
    }

    function removeHandler(e,event,action,param){
      if(document.addEventListener)e.removeEventListener(event,action,param);
      else if(document.attachEvent)e.detachEvent('on'+event,action);
      else e['on'+event]=returnFalse;
    }

    addHandler(document,'mousedown',mouseDown,false);
    addHandler(document,'mouseup',mouseUp,false);

    function mouseDown(e){
      // HACK: calling no selection for class name = "handle hover"
      //if(e.target.className=="handle hover")
      if((e.target.nodeName!="INPUT")&&
        (e.target.nodeName!="TEXTAREA")&&
        (e.target.nodeName!="H1")&&
        (e.target.nodeName!="H2")&&
        (e.target.nodeName!="H3")&&
        (e.target.nodeName!="P")&&
        (e.target.id.substr(0,3)!="lbl")&&
        (e.target.id.substr(0,3)!="ttl")
        )
      {
          e=e||event;
          cancelEvent(e);
          addHandler(document,'selectstart',returnFalse,false);
      }
    }

    function mouseUp(e){
      removeHandler(document,'selectstart',returnFalse,false);
    }
</script></vb:if>


lapiervb 02-04-2012 10:15 AM

Can it disable right click for the members also?

shiraz sat 06-05-2012 03:46 PM

Quote:

Originally Posted by apaydin2148 (Post 2294320)
with this script you can disable text selection. like in the first post you must copy into top of headinclude template. enjoy. :)

Code:

<vb:if condition="is_member_of($bbuserinfo, 1,2,3)">
<script type="text/javascript">
    function returnFalse(e){
      return false;
    }

    function cancelEvent(e){
      if(e.preventDefault)e.preventDefault();
      else e.returnValue=false;
    }

    function addHandler(e,event,action,param){
      if(document.addEventListener)e.addEventListener(event,action,param);
      else if(document.attachEvent)e.attachEvent('on'+event,action);
      else e['on'+event]=action;
    }

    function removeHandler(e,event,action,param){
      if(document.addEventListener)e.removeEventListener(event,action,param);
      else if(document.attachEvent)e.detachEvent('on'+event,action);
      else e['on'+event]=returnFalse;
    }

    addHandler(document,'mousedown',mouseDown,false);
    addHandler(document,'mouseup',mouseUp,false);

    function mouseDown(e){
      // HACK: calling no selection for class name = "handle hover"
      //if(e.target.className=="handle hover")
      if((e.target.nodeName!="INPUT")&&
        (e.target.nodeName!="TEXTAREA")&&
        (e.target.nodeName!="H1")&&
        (e.target.nodeName!="H2")&&
        (e.target.nodeName!="H3")&&
        (e.target.nodeName!="P")&&
        (e.target.id.substr(0,3)!="lbl")&&
        (e.target.id.substr(0,3)!="ttl")
        )
      {
          e=e||event;
          cancelEvent(e);
          addHandler(document,'selectstart',returnFalse,false);
      }
    }

    function mouseUp(e){
      removeHandler(document,'selectstart',returnFalse,false);
    }
</script></vb:if>


Hello
This script can also be used for other user groups?
Please Help

30022 07-11-2012 08:45 AM

Works but in Chrome the scrollbars dont work, so if you dont have a mouse wheel you can't scroll down to read the full content.

I'm using both the right click disable & the disable copy text, not sure which one or both causes this to happen.

davidg 07-11-2012 07:40 PM

Quote:

Originally Posted by TimberFloorAu (Post 1998098)
LOL

You should do the javascript version. When they right click they get a warning, if they do it again : it will redirect them to a porn site !

briliant idea lol
if u can make it please share it with us

faisaly.com 10-07-2012 06:04 PM

Quote:

LOL

You should do the javascript version. When they right click they get a warning, if they do it again : it will redirect them to a porn site !
why give them that kind of enjoyment, why not send them to a different site!

wildheart 03-04-2013 10:01 AM

Thank you so much for this. I have included all 3 although only the 'prevent highlight' should do the job alone.

wildheart 03-14-2013 01:44 PM

Quote:

Originally Posted by apaydin2148 (Post 2294320)
with this script you can disable text selection. like in the first post you must copy into top of headinclude template. enjoy. :)

Code:

<vb:if condition="is_member_of($bbuserinfo, 1,2,3)">
<script type="text/javascript">
    function returnFalse(e){
      return false;
    }

    function cancelEvent(e){
      if(e.preventDefault)e.preventDefault();
      else e.returnValue=false;
    }

    function addHandler(e,event,action,param){
      if(document.addEventListener)e.addEventListener(event,action,param);
      else if(document.attachEvent)e.attachEvent('on'+event,action);
      else e['on'+event]=action;
    }

    function removeHandler(e,event,action,param){
      if(document.addEventListener)e.removeEventListener(event,action,param);
      else if(document.attachEvent)e.detachEvent('on'+event,action);
      else e['on'+event]=returnFalse;
    }

    addHandler(document,'mousedown',mouseDown,false);
    addHandler(document,'mouseup',mouseUp,false);

    function mouseDown(e){
      // HACK: calling no selection for class name = "handle hover"
      //if(e.target.className=="handle hover")
      if((e.target.nodeName!="INPUT")&&
        (e.target.nodeName!="TEXTAREA")&&
        (e.target.nodeName!="H1")&&
        (e.target.nodeName!="H2")&&
        (e.target.nodeName!="H3")&&
        (e.target.nodeName!="P")&&
        (e.target.id.substr(0,3)!="lbl")&&
        (e.target.id.substr(0,3)!="ttl")
        )
      {
          e=e||event;
          cancelEvent(e);
          addHandler(document,'selectstart',returnFalse,false);
      }
    }

    function mouseUp(e){
      removeHandler(document,'selectstart',returnFalse,false);
    }
</script></vb:if>


This code disables the guests from selecting their date of birth on registration. If they click on date etc. it is just blank in google chrome, ie and sometimes firefox. It took me a long time to figure out why all new registrations stopped, nobody could register.

JordanBuss13 03-29-2013 03:07 PM

How do you make it so no one can right click even if there signed in?


All times are GMT. The time now is 11:59 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01221 seconds
  • Memory Usage 1,762KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete