vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=229)
-   -   Forum Display Enhancements - Disable Select and Right click (https://vborg.vbsupport.ru/showthread.php?t=178004)

Silver Boy 05-02-2008 10:00 PM

Disable Select and Right click
 
somebody doesn't like to someone copy text and picture of their forum.
this codes help them to solve this problem

Disable Select in board

add this code in header of style:

Code:

<!------ disable Select ------->
<head>
<meta http-equiv="Content-Language" content="en-us">
</head>
<script language="JavaScript1.2">
<!--
function disableselect(e){
return false
}
function reEnable(){
return true
}
//if IE4+
document.onselectstart=new Function ("return false")
//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
//  -->
</script>
<!------ /disable Select ------->


Disable mouse right click in IE and Firefox (I didn't check for othere explorer, maybe work)
add this code in header of style:

Code:

<!------ disable right click ------->
<script language="JavaScript">
<!--
 
var message="";
///////////////////////////////////
function clickIE()
 
{if (document.all)
{(message);return false;}}
 
function clickNS(e) {
if
(document.layers||(document.getElementById&&!document.all))
{
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else
{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
 
document.oncontextmenu=new Function("return false")
// -->
</script>
<!------ /disable right click ------->


Update : Deleted "disable right click in IE" for no confusion

koolfire 05-03-2008 09:21 PM

Disabling Right click code thing doesn't wokr

Tried this on 3.6.8

Silver Boy 05-04-2008 06:26 AM

work in IE,
but I was update anothere code that work correctly in 3.7.x with IE and Firefox browser (maybe work with othere browser)
enjoy https://vborg.vbsupport.ru/external/2008/05/60.gif

beduino 05-04-2008 03:39 PM

hi
i install to test and ...
[last code]
works in iexplorer 7
don't work in ffox
tks
beduino

Silver Boy 05-04-2008 07:26 PM

Quote:

Originally Posted by beduino (Post 1508201)
hi
i install to test and ...
[last code]
works in iexplorer 7
don't work in ffox
tks
beduino

did you use Disable mouse right click in IE and Firefox ? (I think u used disable right click only in IE)
I was Delete "disable right click in IE" for no confusion

just use first code for disable selecting
and use seconde code for disable right click

sure that work correctly https://vborg.vbsupport.ru/external/2008/05/60.gif

Jase2 05-04-2008 08:52 PM

Seen too many of these. Simply turning javascript off in your browser makes this completely useless, unfortunately.

Guest210212002 05-04-2008 11:49 PM

This is just plain old JS, not really a vB mod at all.

Mike-D 05-08-2008 06:46 PM

To be honest: Disabling right clicking makes no sense and does not really protect. It's really simple to avoid this. Anyone who's determined to copy your content or code will do so regardless of his or her ability to bring up a browser context menu. If they want your source code then it's as simple as selecting 'View Source' from the main menu. The needed or searched text can be highlighted and copied. Also images and media presentations can be retrieved from the cache and streaming media can be recorded. Disabling right-click will only make people more determined to learn exactly what it is you're hiding. And this could end up being counter-productive, as your images and source code attract unwanted attention. Not only that, but you can only disable right-click on browsers that have JavaScript enabled! This means: A visitor only has to turn off JavaScript in their browser's options to be able to ignore the script altogether!

Don't forget: Firefox provides users an easy way to stop these common Javascript annoyances! Also most Firefox users does have the Firebug Addon installed. Using this makes the cracking Javascript code more easier! Only a well meant advice :) -Mike

RvG2 08-25-2008 03:08 AM

thanks for the code... I need this in some parts of the board.

Hostboard 08-25-2008 01:10 PM

Quote:

Originally Posted by Mike-D (Post 1512955)
To be honest: Disabling right clicking makes no sense and does not really protect. It's really simple to avoid this. Anyone who's determined to copy your content or code will do so regardless of his or her ability to bring up a browser context menu. If they want your source code then it's as simple as selecting 'View Source' from the main menu. The needed or searched text can be highlighted and copied. Also images and media presentations can be retrieved from the cache and streaming media can be recorded. Disabling right-click will only make people more determined to learn exactly what it is you're hiding. And this could end up being counter-productive, as your images and source code attract unwanted attention. Not only that, but you can only disable right-click on browsers that have JavaScript enabled! This means: A visitor only has to turn off JavaScript in their browser's options to be able to ignore the script altogether!

Don't forget: Firefox provides users an easy way to stop these common Javascript annoyances! Also most Firefox users does have the Firebug Addon installed. Using this makes the cracking Javascript code more easier! Only a well meant advice :) -Mike

This is just meant to make someone work for it instead of making it easier.


All times are GMT. The time now is 05:11 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.01204 seconds
  • Memory Usage 1,741KB
  • 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
  • (2)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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