MyBB Community Forums

Full Version: Prevent select/copy in MyBB Threads
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi Guys,

I am running MyBB version 1.4.2.

I have a standard forum see here for typical thread.

If you right-click on the screen the context menu appears, which allows the reader to view the source or copy an image.

I prevent casual users from doing this on my website by including the following code in my header.

<!DOCTYPE HTML>

<html> 

   <head>
        ...
      <script type="text/javascript" language="JavaScript" src="NoRightClick.js"></script>
   </head> 

<body oncontextmenu="return false;" onmousedown="return false;" onselectstart="return false;"> 

Can similar code be inserted into MyBB to (1) suppress the context menu, and (2) prevent text/images from being selected (and consequently be copied), yet still allow for normal functionality of hyperlinks, buttons, etc?
yes you can insert the code as above in your header templates.......
(2008-09-18, 03:04 AM)MyBBmodding Wrote: [ -> ]yes you can insert the code as above in your header templates.......

Which one? I looked and could not find the appropriate section.
*templates* -> Ungrouped Templates -> headerinclude
You know that if people view the source, they will still be able to copy text and the URL of images no problem??
(2008-09-18, 07:52 AM)Matt_ Wrote: [ -> ]You know that if people view the source, they will still be able to copy text and the URL of images no problem??

Matt's right. You can disable right-click all you want, but how are you going to stop me from disabling javascript - making your script useless?

Plus, it's practically impossible to stop keyboard shortcuts (CTRL-C etc.) and print screens for the hardy - even "casual users", when they want something badly, will revert to this...
Exactly... whenever right click is disabled, and I want the picture, I view the source, get the URL, put it in my browser and there's my picture. Or like Tom said, CTRL+C still works (although a surprising amount of people don't know that shortcut exists Toungue). At least you can't really copy text as it is with a printscreen...
nthing all the above posts. This will do nothing but bother people.
OK Guys,

I know that you are able to get around this restriction. As I stated I am only trying to stop the casual user from pilfering data from my site. I don't have a problem with people printing or citing a tread, just cutting-and-pasting information and saying it's theirs Angry.

As for being a bother. Why? I have setup the restrictions on the above mentioned thread >>CLICK HERE<< and I don't see any problems. You can navigate, read, print the thread - just not plagiarise it (at least without spending a few minutes mucking around, and lets face it most people are essentially lazy).

Thanks for your help everyone.
(2008-09-18, 10:09 AM)Simon Cropper Wrote: [ -> ]OK Guys,

I know that you are able to get around this restriction. As I stated I am only trying to stop the casual user from pilfering data from my site. I don't have a problem with people printing or citing a tread, just cutting-and-pasting information and saying it's theirs Angry.

As for being a bother. Why? I have setup the restrictions on the above mentioned thread >>CLICK HERE<< and I don't see any problems. You can navigate, read, print the thread - just not plagiarise it (at least without spending a few minutes mucking around, and lets face it most people are essentially lazy).

Thanks for your help everyone.

I often copy and paste sections from forums to other people I am talking to over IM. I guess if I want to do that on your board, um, well, I guess I can't, so I probably just won't ever go to your board.

This is the equivalent of DRM; you're only going to annoy people who weren't out to hurt you in the first place, and everyone who wants to steal it will steal it.
Pages: 1 2