Thread: Miscellaneous Hacks - Disable Right Click on your Forum
View Single Post
  #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
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01162 seconds
  • Memory Usage 1,800KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete