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)

Mastar 05-24-2007 10:00 PM

Disable Right Click on your Forum
 
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

kkeezer 05-25-2007 02:55 AM

Once it becomes support, I'll install it.

Great Idea, Thank you! :up:

Kyle

HMBeaty 05-25-2007 02:59 AM

Quote:

Originally Posted by kkeezer (Post 1254220)
Once it becomes support, I'll install it.

Great Idea, Thank you! :up:

Kyle

I just looked it over and there's nothing wrong with it TO support it, so it would be pointless to have this as supported as its adding the "Disable Right Click" Javascript to your header template automatically for you.

Nice mod though OP. And GLAD you mentioned that it doesn't 100% fully prevent people from stealing images :)

Mastar 05-25-2007 03:04 AM

Thanks! As Redline said there is really nothing to support unless you need assistance on how to import a product. All it does really is adds the code in your forum so it makes it easier for you to upgrade vbulletin without having to worry about another template edit, which I hate.

If you need assistance with anything I will try my best to help yah. Thanks!

kkeezer 05-25-2007 03:06 AM

Thanks for pointing that out Redline...;) Thank you to Mastar!

Kyle

LisaD1 05-25-2007 03:10 AM

I have been looking for something like this! Thanks. And preventing some will hopefully discourage them from trying again.

HMBeaty 05-25-2007 03:11 AM

No problem everyone. :) Glad I could help

Zerovb 05-25-2007 03:28 AM

After I Import The Product I Can Click On The Mouse Right Click Easy

Tell Me If I Can Do Anything Else After Importing The Product

HMBeaty 05-25-2007 03:29 AM

Make sure you have Javascript enabled on your computer

Mastar 05-25-2007 03:33 AM

Its for no right click on images... I should have make that bold. Will edit now.

FreshFroot 05-25-2007 04:16 AM

this hack is already made... I think Ziki made one...

HMBeaty 05-25-2007 04:22 AM

Quote:

Originally Posted by FreshFroot (Post 1254257)
this hack is already made... I think Ziki made one...

You are right, see here. BUT, I think his is disabling right click everywhere. The one here disables right click on images

Mastar 05-25-2007 04:25 AM

Oh yeah didn't even see that. Well there is two here now, one for images and one for the entire right click disable. :)

iogames 05-25-2007 04:58 AM

Quote:

Originally Posted by Redlinemotorsports (Post 1254259)
You are right, see here. BUT, I think his is disabling right click everywhere. The one here disables right click on images

Where can I contact you Mr Red?

HMBeaty 05-25-2007 04:59 AM

Quote:

Originally Posted by iogames (Post 1254272)
Where can I contact you Mr Red?

Contact me for what?

rjmjr69 05-25-2007 05:09 AM

Nice idea. Does this block staff/admins as well? If so would you consider updating it so one could select users that are allowed to use right click?

-----reserved--------

Endurer 05-25-2007 05:55 AM

Installed, I was looking for one that could disable right click on images only. Is there a way to make this work with photoplog lite as well?

Thanks.

iogames 05-25-2007 06:54 AM

Quote:

Originally Posted by Redlinemotorsports (Post 1254273)
Contact me for what?

Nooo, with that attitude? for nothing ;)

6piston 05-25-2007 09:12 AM

funny

it doesn't work on my site
http://www.zerotohundred.com/newforums

i imported the product and tried right clicking on the images and i could?
anyone experiencing this?

Thanks
Tom

Barakat 05-25-2007 09:59 AM

i was useing like this but not as a product ,,,,,

just codes which you can put it in the headinclues template

any way thanks a lot ,,,,,

Travlur 05-25-2007 10:24 AM

Will this work with other add-ons like photoplog anyone?

BTW iogames - freud and hmmmm

maxicep 05-25-2007 01:23 PM

disable right click image do not work on Firefox .

projectego 05-25-2007 01:45 PM

Nice idea. While as you say it isn't fool-proof, it should hopefully help. Thank!

Mastar 05-25-2007 03:07 PM

Sorry for the disable right on images I messed up.... it works now and also I added a on/off option from vb options.

Download the one that's there now. Thanks!

pictureboarduk 05-25-2007 03:52 PM

Great idea, but can it be operational on a forum by forum basis?

Don't want it for the whole site.

:)

bitdefuser 05-25-2007 06:29 PM

Isn't this kind of a bad thing? Like if users need to copy and paste text, it'll discourage them from posting. (Unless they use CTRL + C and V but, I'm sure not many know about that method.)

Mastar 05-26-2007 12:39 AM

Quote:

Originally Posted by bitdefuser (Post 1254600)
Isn't this kind of a bad thing? Like if users need to copy and paste text, it'll discourage them from posting. (Unless they use CTRL + C and V but, I'm sure not many know about that method.)

Updated where you have the option to allow your members to use right click on text.

ninjamaster 05-28-2007 08:22 AM

thanks m8

Mrdby 05-28-2007 03:25 PM

phpbb has a mod like this..and u can use it under your ACP..and have mods and admins the onl yones that are able to right click. Maybe someone could like it the code and make one for vbull?

Mastar 05-28-2007 04:16 PM

Quote:

Originally Posted by Mrdby (Post 1256256)
phpbb has a mod like this..and u can use it under your ACP..and have mods and admins the onl yones that are able to right click. Maybe someone could like it the code and make one for vbull?

Admins and mods are not affected by the right click disabled.

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 04:59 PM.

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.01464 seconds
  • Memory Usage 1,865KB
  • 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
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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