Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons

Reply
 
Thread Tools
Disable Right Click on your Forum Details »»
Disable Right Click on your Forum
Version: 5.0.0, by Mastar Mastar is offline
Developer Last Online: Aug 2012 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.6.8 Rating:
Released: 05-24-2007 Last Update: 12-30-2007 Installs: 187
Uses Plugins Template Edits Auto-Templates
 
No support by the author.

This disables right clicking on all images only or everything and text selection.
With Usergroup Permission and specified forums.

Although its not 100% proof it will discourage people from trying to steal your images and site content.
Hopefully. I know there are many ways to get around this but its a start.

You must have javascript enable!

Uninstall any other Right CLick Hacks/Mods.
Import the product via the ACP.
Go to vbulletin Options -->> BAJI26 - Disable Right Click and adjust your settings.
Setting the FORUMID to 0 will disable the entire forum.
Time: 30 secs


- Updated: Disable Right Click for images and total right click disabled.
- Update: Added options to turn the hack on/off from vb options.
- Update: Added disable per usergroup option.
- Update: Added option to custom alert messages.
- Update: Added option to disable text selection per usergroup.
- Update: Added option to apply hack to certain forums, and users.




CLICK INSTALL

Show Your Support

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

Comments
  #32  
Old 05-29-2007, 11:41 AM
RENDY81 RENDY81 is offline
 
Join Date: Mar 2007
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

install, thanks pal..
Reply With Quote
  #33  
Old 05-29-2007, 12:09 PM
Mrdby Mrdby is offline
 
Join Date: Mar 2007
Location: Hades
Posts: 1,298
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how can we change the message? also next release can we have an option..when people and try to right click it logs them out?
Reply With Quote
  #34  
Old 05-29-2007, 02:52 PM
Mastar's Avatar
Mastar Mastar is offline
 
Join Date: Sep 2005
Posts: 680
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Mrdby View Post
how can we change the message? also next release can we have an option..when people and try to right click it logs them out?
To change the message open the product:

Find
PHP Code:
var message="That feature has been Disabled. If you need any content contact the Site Owner!"
And change what's between the quotes in red.

To add that option is a thought and I'll look into it.
Reply With Quote
  #35  
Old 05-29-2007, 03:52 PM
Mrdby Mrdby is offline
 
Join Date: Mar 2007
Location: Hades
Posts: 1,298
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Mastar View Post
To change the message open the product:

Find
PHP Code:
var message="That feature has been Disabled. If you need any content contact the Site Owner!"
And change what's between the quotes in red.

To add that option is a thought and I'll look into it.
MANY THANKS!!!
Reply With Quote
  #36  
Old 05-29-2007, 04:02 PM
Mrdby Mrdby is offline
 
Join Date: Mar 2007
Location: Hades
Posts: 1,298
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oops..where do i find this? product manager?
Reply With Quote
  #37  
Old 05-29-2007, 06:01 PM
Mastar's Avatar
Mastar Mastar is offline
 
Join Date: Sep 2005
Posts: 680
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Mrdby View Post
oops..where do i find this? product manager?
That is in the zip that you downloaded, the xml file.
Reply With Quote
  #38  
Old 05-29-2007, 07:31 PM
Mrdby Mrdby is offline
 
Join Date: Mar 2007
Location: Hades
Posts: 1,298
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
<?xml version="1.0" encoding="ISO-8859-1"?>

<product productid="Disable_Right_Click" active="1">
  <title>Disable_Right_Click</title>
  <description>Disabling The Use Of Right Click 3.0.0</description>
  <version>3.00</version>
  <url><![CDATA[https://vborg.vbsupport.ru/misc.php?do=producthelp&pid=rightclick_disable-Mastar]]></url>
  <versioncheckurl><![CDATA[https://vborg.vbsupport.ru/misc.php?do=productcheck&pid=rightclick_disable-Mastar]]></versioncheckurl>
  <dependencies>
  </dependencies>
  <codes>
  </codes>
  <templates>
    <template name="DisableAll" templatetype="template" date="0" username="Mastar" version=""><![CDATA[<if condition="$vboptions[DisableAllcode1]">
<if condition="!is_member_of($bbuserinfo, 5, 6, 7)">
<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>
</if>
</if>
]]></template>
    <template name="DisableImage" templatetype="template" date="0" username="Mastar" version=""><![CDATA[
   <if condition="$vboptions[DisableImagecode2]">
<if condition="!is_member_of($bbuserinfo, 5, 6, 7)">


<script language="JavaScript1.2">
/*
Disable right click script II (on images)- By Dynamicdrive.com
For full source, Terms of service, and 100s DTHML scripts
Visit http://www.dynamicdrive.com
*/

var clickmessage="Right click disabled on images! If you need an image please contact the Site Owner."

function disableclick(e) {
if (document.all) {
if (event.button==2||event.button==3) {
if (event.srcElement.tagName=="IMG"){
alert(clickmessage);
return false;
}
}
}
else if (document.layers) {
if (e.which == 3) {
alert(clickmessage);
return false;
}
}
else if (document.getElementById){
if (e.which==3&&e.target.tagName=="IMG"){
alert(clickmessage)
return false
}
}
}
function associateimages(){
for(i=0;i<document.images.length;i++)
document.images[i].onmousedown=disableclick;
}
if (document.all)
document.onmousedown=disableclick
else if (document.getElementById)
document.onmouseup=disableclick
else if (document.layers)
associateimages()
</script> </if>
</if>
]]></template>
  </templates>
  <plugins>
    <plugin active="1" executionorder="5">
      <title>Disable_Right_Click</title>
      <hookname>cache_templates</hookname>
      <phpcode><![CDATA[$globaltemplates  = array_merge($globaltemplates, array('DisableImage'));
      ]]></phpcode>
    </plugin>
    <plugin active="1" executionorder="5">
      <title>Disable_Right_Click</title>
      <hookname>cache_templates</hookname>
      <phpcode><![CDATA[$globaltemplates  = array_merge($globaltemplates, array('DisableAll'));
      ]]></phpcode>
    </plugin>
    <plugin active="1" executionorder="5">
      <title>Right Click Disabled on Images</title>
      <hookname>global_start</hookname>
      <phpcode><![CDATA[$search_text = '<!-- Do not remove this copyright notice -->';
$vbulletin->templatecache['footer'] = str_replace($search_text,
$search_text.fetch_template('DisableImage'),$vbulletin->templatecache['footer']);
]]></phpcode>
    </plugin>
    <plugin active="1" executionorder="5">
      <title>Disable_Right_Click</title>
      <hookname>global_start</hookname>
      <phpcode><![CDATA[$search_text = '<!-- /logo -->';
$vbulletin->templatecache['header'] = str_replace($search_text,
$search_text.fetch_template('DisableAll'),$vbulletin->templatecache['header']);
]]></phpcode>
    </plugin>
  </plugins>
  <phrases>
    <phrasetype name="vBulletin Settings" fieldname="vbsettings">
      <phrase name="setting_DisableAllcode1_desc" date="0" username="Mastar" version="3.0.0"><![CDATA[
                Yes to enable / No to disable]]></phrase>
      <phrase name="setting_DisableAllcode1_title" date="0" username="Mastar" version="3.0.0"><![CDATA[
                Prevent Right Click On Everything?]]></phrase>
      <phrase name="setting_DisableImagecode2_desc" date="0" username="Mastar" version="3.0.0"><![CDATA[
                Yes to enable / No to disable]]></phrase>
      <phrase name="setting_DisableImagecode2_title" date="0" username="Mastar" version="3.0.0"><![CDATA[
                Prevent Right Click On Images?]]></phrase>
      <phrase name="settinggroup_Allgroup" date="0" username="Mastar" version="3.0.0"><![CDATA[
                Disable Right Click by Mastar aka BAJI26]]></phrase>
    </phrasetype>
  </phrases>
  <options>
    <settinggroup name="Allgroup" displayorder="8904">
      <setting varname="DisableAllcode1" displayorder="20">
        <datatype>boolean</datatype>
        <optioncode>yesno</optioncode>
        <defaultvalue>1</defaultvalue>
      </setting>
      <setting varname="DisableImagecode2" displayorder="30">
        <datatype>boolean</datatype>
        <optioncode>yesno</optioncode>
        <defaultvalue>1</defaultvalue>
      </setting>
    </settinggroup>
  </options>
  <helptopics>
  </helptopics>
  <cronentries>
  </cronentries>
  <faqentries>
  </faqentries>
</product>
where?
Reply With Quote
  #39  
Old 05-29-2007, 08:08 PM
Mastar's Avatar
Mastar Mastar is offline
 
Join Date: Sep 2005
Posts: 680
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Mrdby View Post
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>

<product productid="Disable_Right_Click" active="1">
  <title>Disable_Right_Click</title>
  <description>Disabling The Use Of Right Click 3.0.0</description>
  <version>3.00</version>
  <url><![CDATA[https://vborg.vbsupport.ru/misc.php?do=producthelp&pid=rightclick_disable-Mastar]]></url>
  <versioncheckurl><![CDATA[https://vborg.vbsupport.ru/misc.php?do=productcheck&pid=rightclick_disable-Mastar]]></versioncheckurl>
  <dependencies>
  </dependencies>
  <codes>
  </codes>
  <templates>
    <template name="DisableAll" templatetype="template" date="0" username="Mastar" version=""><![CDATA[<if condition="$vboptions[DisableAllcode1]">
<if condition="!is_member_of($bbuserinfo, 5, 6, 7)">
<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>
</if>
</if>
]]></template>
    <template name="DisableImage" templatetype="template" date="0" username="Mastar" version=""><![CDATA[
   <if condition="$vboptions[DisableImagecode2]">
<if condition="!is_member_of($bbuserinfo, 5, 6, 7)">


<script language="JavaScript1.2">
/*
Disable right click script II (on images)- By Dynamicdrive.com
For full source, Terms of service, and 100s DTHML scripts
Visit http://www.dynamicdrive.com
*/

var clickmessage="Right click disabled on images! If you need an image please contact the Site Owner."

function disableclick(e) {
if (document.all) {
if (event.button==2||event.button==3) {
if (event.srcElement.tagName=="IMG"){
alert(clickmessage);
return false;
}
}
}
else if (document.layers) {
if (e.which == 3) {
alert(clickmessage);
return false;
}
}
else if (document.getElementById){
if (e.which==3&&e.target.tagName=="IMG"){
alert(clickmessage)
return false
}
}
}
function associateimages(){
for(i=0;i<document.images.length;i++)
document.images[i].onmousedown=disableclick;
}
if (document.all)
document.onmousedown=disableclick
else if (document.getElementById)
document.onmouseup=disableclick
else if (document.layers)
associateimages()
</script> </if>
</if>
]]></template>
  </templates>
  <plugins>
    <plugin active="1" executionorder="5">
      <title>Disable_Right_Click</title>
      <hookname>cache_templates</hookname>
      <phpcode><![CDATA[$globaltemplates  = array_merge($globaltemplates, array('DisableImage'));
      ]]></phpcode>
    </plugin>
    <plugin active="1" executionorder="5">
      <title>Disable_Right_Click</title>
      <hookname>cache_templates</hookname>
      <phpcode><![CDATA[$globaltemplates  = array_merge($globaltemplates, array('DisableAll'));
      ]]></phpcode>
    </plugin>
    <plugin active="1" executionorder="5">
      <title>Right Click Disabled on Images</title>
      <hookname>global_start</hookname>
      <phpcode><![CDATA[$search_text = '<!-- Do not remove this copyright notice -->';
$vbulletin->templatecache['footer'] = str_replace($search_text,
$search_text.fetch_template('DisableImage'),$vbulletin->templatecache['footer']);
]]></phpcode>
    </plugin>
    <plugin active="1" executionorder="5">
      <title>Disable_Right_Click</title>
      <hookname>global_start</hookname>
      <phpcode><![CDATA[$search_text = '<!-- /logo -->';
$vbulletin->templatecache['header'] = str_replace($search_text,
$search_text.fetch_template('DisableAll'),$vbulletin->templatecache['header']);
]]></phpcode>
    </plugin>
  </plugins>
  <phrases>
    <phrasetype name="vBulletin Settings" fieldname="vbsettings">
      <phrase name="setting_DisableAllcode1_desc" date="0" username="Mastar" version="3.0.0"><![CDATA[
                Yes to enable / No to disable]]></phrase>
      <phrase name="setting_DisableAllcode1_title" date="0" username="Mastar" version="3.0.0"><![CDATA[
                Prevent Right Click On Everything?]]></phrase>
      <phrase name="setting_DisableImagecode2_desc" date="0" username="Mastar" version="3.0.0"><![CDATA[
                Yes to enable / No to disable]]></phrase>
      <phrase name="setting_DisableImagecode2_title" date="0" username="Mastar" version="3.0.0"><![CDATA[
                Prevent Right Click On Images?]]></phrase>
      <phrase name="settinggroup_Allgroup" date="0" username="Mastar" version="3.0.0"><![CDATA[
                Disable Right Click by Mastar aka BAJI26]]></phrase>
    </phrasetype>
  </phrases>
  <options>
    <settinggroup name="Allgroup" displayorder="8904">
      <setting varname="DisableAllcode1" displayorder="20">
        <datatype>boolean</datatype>
        <optioncode>yesno</optioncode>
        <defaultvalue>1</defaultvalue>
      </setting>
      <setting varname="DisableImagecode2" displayorder="30">
        <datatype>boolean</datatype>
        <optioncode>yesno</optioncode>
        <defaultvalue>1</defaultvalue>
      </setting>
    </settinggroup>
  </options>
  <helptopics>
  </helptopics>
  <cronentries>
  </cronentries>
  <faqentries>
  </faqentries>
</product>
where?


Here:

PHP Code:
var clickmessage="Right click disabled on images! If you need an image please contact the Site Owner." 
I didn't know you meant the image right click one.
Reply With Quote
  #40  
Old 06-02-2007, 09:13 PM
SCRIPT3R SCRIPT3R is offline
 
Join Date: Jan 2005
Posts: 1,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is possible to add <if> condition for forum based application on/off?

(<if condition="!is_forumdisplay.php?($f=X, X, X)"> or something to that effect so that this would not apply to certain selected forums?
Reply With Quote
  #41  
Old 06-03-2007, 04:52 AM
Mastar's Avatar
Mastar Mastar is offline
 
Join Date: Sep 2005
Posts: 680
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by GearTripper View Post
is possible to add <if> condition for forum based application on/off?

(<if condition="!is_forumdisplay.php?($f=X, X, X)"> or something to that effect so that this would not apply to certain selected forums?
Gonna work on that, thatnks!
Reply With Quote
Reply

Thread Tools

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 05:14 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.12105 seconds
  • Memory Usage 2,337KB
  • Queries Executed 25 (?)
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
  • (3)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete