We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Locked Topic
[ C ] No Right Click
Topic Started: Aug 12 2012, 03:25 PM (210 Views)
Deleted User
Deleted User

Board Address: (Link to your board or class it as 'Private')
Board Software: (ZetaBoards or InvisionFree)
Description: (What you want your code to do)

I want the no right click code disable one section not the entire forums section stop people for stealing something from the board. For an example

Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Disable right click codes can easily be circumvented, just so you know. Any who, here's the code:

Admin CP Posted Image Themes Posted Image Board Template Posted Image Below the Board
Code:
 
<script type="text/javascript">
(function ($) {
var forumID = 'FORUM_ID';

if (location.href.indexOf('/forum/' + forumID + '') !== -1 || $('#nav a[href*="/forum/' + forumID + '"]').length) {
$('*').bind('contextmenu', function (e) {
e.returnValue = e.preventDefault && e.preventDefault() ? false : false;
});
}
})(jQuery);
</script>
Change FORUM_ID as necessary.
Offline Profile Goto Top
 
Deleted User
Deleted User

This is code not working for me I put the url link in forum ID.

Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
You're only suppose to put the forum ID.

http://resources.zetaboards.com/forum/1000326/

1000326, for example, is the forum ID.
Offline Profile Goto Top
 
Deleted User
Deleted User

It's work I would like to have a pop up box say "oops" so people wouldn't have too much on their hands write everything down on a piece paper.
Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Code:
 
<script type="text/javascript">
(function ($) {
var forumID = 'FORUM_ID';

if (location.href.indexOf('/forum/' + forumID + '') !== -1 || $('#nav a[href*="/forum/' + forumID + '"]').length) {
$('body').bind('contextmenu', function (e) {
e.returnValue = e.preventDefault && e.preventDefault() ? false : false;
alert('Right clicking is disabled in this forum');
});
}
})(jQuery);
</script>
Try that instead.
Offline Profile Goto Top
 
Deleted User
Deleted User

Thanks Cody!!!!!
Goto Top
 
Steve
Member Avatar
patriot
[ *  *  *  *  *  *  *  *  *  * ]
Completed!

Your request has been completed. If you have any questions or concerns regarding the state of your request, please feel free to contact me via PM.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Closed Requests · Next Topic »
Locked Topic