vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Miscellaneous Hacks - Disable Right Click on your Forum (https://vborg.vbsupport.ru/showthread.php?t=148078)

RENDY81 05-29-2007 11:41 AM

install, thanks pal..

Mrdby 05-29-2007 12:09 PM

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?

Mastar 05-29-2007 02:52 PM

Quote:

Originally Posted by Mrdby (Post 1256843)
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.

Mrdby 05-29-2007 03:52 PM

Quote:

Originally Posted by Mastar (Post 1256928)
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!!!

Mrdby 05-29-2007 04:02 PM

oops..where do i find this? product manager?

Mastar 05-29-2007 06:01 PM

Quote:

Originally Posted by Mrdby (Post 1256955)
oops..where do i find this? product manager?

That is in the zip that you downloaded, the xml file.

Mrdby 05-29-2007 07:31 PM

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?

Mastar 05-29-2007 08:08 PM

Quote:

Originally Posted by Mrdby (Post 1257075)
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.

SCRIPT3R 06-02-2007 09:13 PM

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?

Mastar 06-03-2007 04:52 AM

Quote:

Originally Posted by GearTripper (Post 1259948)
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!


All times are GMT. The time now is 06:13 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01550 seconds
  • Memory Usage 1,807KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (3)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete