Go Back   vb.org Archive > vBulletin Modifications > vBulletin 5.x Modifications > vBulletin 5.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Disable Right Click Details »»
Disable Right Click
Version: 1.00, by Shadow Shadow is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 5.0.0 Beta 11 Rating:
Released: 10-12-2012 Last Update: 10-15-2012 Installs: 13
Template Edits
Re-useable Code Translations  
No support by the author.

This script will act as a sort of barrier to prevent people from right clicking on your forum thus offering some sort of protection. There are ways to get round this but think of it as a hurdle which may put some people off.

Add the following code to the header template:
Code:
<script type="text/javascript">
<!--
var error="Right click functionality is disabled";

function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(error);return false")

// --> 
</script>
While this blocks the ability to Right Click, it also blocks the ability to copy and paste through the context menu that appears when Right Clicking. Copy and paste functionality is still available through the Ctrl+C and Ctrl+V shortcuts respectively.

Editing the Error Message:
Changing the message shown is a piece of cake. This can be done by finding this line near the top of the script:

Code:
var error="Right click functionality is disabled";
Change the text in quotes to anything you like.

Download Now

File Type: xml product_disablerightclick.xml (2.4 KB, 104 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 06-01-2014, 05:27 AM
MajorKokosnuss MajorKokosnuss is offline
 
Join Date: Apr 2014
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how can i disable this block for admins ?
Reply With Quote
  #13  
Old 06-01-2014, 05:53 AM
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
Posts: 6,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MajorKokosnuss View Post
how can i disable this block for admins ?
https://vborg.vbsupport.ru/showthread.php?t=310210
This plugin is better
Reply With Quote
  #14  
Old 06-01-2014, 06:57 AM
MajorKokosnuss MajorKokosnuss is offline
 
Join Date: Apr 2014
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i need one for v 5.1.1
Reply With Quote
  #15  
Old 06-01-2014, 08:20 AM
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
Posts: 6,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did not see this was vb5 section
Reply With Quote
  #16  
Old 06-01-2014, 08:30 AM
AusPhotography's Avatar
AusPhotography AusPhotography is offline
 
Join Date: Nov 2007
Location: Hobart & Adelaide .au
Posts: 521
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

We are a photography forum.
We don't implement anti-right click.
Why? Its just too easy to circumvent and it only keeps honest people away.

You are better off making attachments not visible to guests/not logged in than doing this.

Just sayin, it gives people a very false sense of security
Reply With Quote
2 благодарности(ей) от:
K4GAP, tbworld
  #17  
Old 06-01-2014, 04:14 PM
Spangle Spangle is offline
 
Join Date: Jun 2011
Posts: 520
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great little fix for anyone with their own photo's on a site, and the fact the message is customisable is great too.
Reply With Quote
  #18  
Old 06-02-2014, 02:54 AM
AusPhotography's Avatar
AusPhotography AusPhotography is offline
 
Join Date: Nov 2007
Location: Hobart & Adelaide .au
Posts: 521
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Spangle View Post
Great little fix for anyone with their own photo's on a site, and the fact the message is customisable is great too.
Read my post above.

The problem is that this mod gives a very very very false sense of security.
And this comment brought to you by a photography who runs a photography forum - go figure!

Reply With Quote
  #19  
Old 06-02-2014, 04:27 PM
Spangle Spangle is offline
 
Join Date: Jun 2011
Posts: 520
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by AusPhotography View Post
Read my post above.

The problem is that this mod gives a very very very false sense of security.
And this comment brought to you by a photography who runs a photography forum - go figure!


I did read your comment above, and yes I do know there are ways around it, but stopping a copy/paste will put off the casual plagiarism, they probably wont have the means to prnt scrn, import it into photoshop, just for a picture.

The hardened user will of course be able to.

The safest way is watermark all pictures before publishing them, which is what all the stock photo sites do. even then if you know your way around PS you can remove a watermark with a few clicks.
Reply With Quote
  #20  
Old 06-04-2014, 01:49 AM
AusPhotography's Avatar
AusPhotography AusPhotography is offline
 
Join Date: Nov 2007
Location: Hobart & Adelaide .au
Posts: 521
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Spangle View Post
I did read your comment above, and yes I do know there are ways around it, but stopping a copy/paste will put off the casual plagiarism, they probably wont have the means to prnt scrn, import it into photoshop, just for a picture.

The hardened user will of course be able to.

The safest way is watermark all pictures before publishing them, which is what all the stock photo sites do. even then if you know your way around PS you can remove a watermark with a few clicks.
a) You don't have to be hard core to do this; just disable JS in your browser while on the page and get the image direct via right click -- hence my false sense of security comment

Quote:
Firefox: (it's this easy)
  1. In the address bar, type "about:config" (with no quotes), and press Enter.
  2. Click "I'll be careful, I promise"
  3. In the search bar, search for "javascript.enabled" (with no quotes).
  4. Right click the result named "javascript.enabled" and click "Toggle". JavaScript is now disabled.
b) I 100% agree that watermarking is your best defence other than not publishing
Reply With Quote
  #21  
Old 10-23-2014, 08:03 AM
Merenguista's Avatar
Merenguista Merenguista is offline
 
Join Date: Sep 2010
Location: Morocco
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TheSupportForum View Post
Suggestion :

1) Create Template with this code
2) create a hook : in Header_head
Template Name : from template 1


then there is no need to edit the template

with VB5 alot of use will be aiming towards using template hooks to do all the tasks for use
Can u please give us even more details so i can create a template and hook as a beginner ?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:47 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04991 seconds
  • Memory Usage 2,339KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (2)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete