Advertisement:

Author Topic: Disable Right Click (v4.0 Released!)  (Read 145636 times)

Offline Chas Large

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,108
  • Gender: Male
  • Running 2.0.xx on Apache.
    • Chas.Large on Facebook
    • https://www.linkedin.com/in/charles-large-568ba213 on LinkedIn
    • @https://twitter.com/ on Twitter
    • Chas Large's Site
Disable Right Click (v4.0 Released!)
« on: May 07, 2008, 07:10:11 PM »
Disable Right Click v4.1.xx - Chas Large
Disable the right click button for selected membergroups and also protect your images directory.




Author
:
New code - Chas Large
Original Mod- NIBOGO

Features:
o Permission to disable Right Click Button within the SMF Permission system.
o You can use your own text to advise guests that the right click is disabled.
o You can enable or disable the whole Mod in the Mod Settings.
o Automatically installation in all the themes.
o Support for SMF 1.1.xx & 2.0.xx
o English, Spanish_latin, Spanish_es with utf8 support.
o You can Show a Message or not when a user attempts to use the right click button.
o Protect the images directory with an empty index.php.

Languages:
- English/English-utf8
- Spanish Latin/Spanish Latin-utf8
- Spanish Es/Spanish Es-utf8
- Portuguese and Brazilian. Translation by Candidosa2 (Joomlamz)

Compatibility:
- 1.1.X
- 2.0.x


Changelogs:

4.1.1 - 14 Jan 2012

o Portuguese and Brazilian translations added.

4.1.0 - 13 Jan 2012

o Recoded the 1.1.xx Install
o Recoded the Install English Text for better readability.
o Tested with 2.0.xx

4.0.1 - 08 Oct 2009

o Added support for SMF 1.1.10
o Should be working in all the SMF Versions so this is the final unless something big happend

4.0 - 18 May 2009

o Total re-estructure of all the mod
o Maybe this is the final release

3.3 - 17 May 2009

o Added arabic utf8 translation
- Changed the readme file :p

3.2 - 28 March 2009

o Fixed a bug with the xhtml validation and breaking ajax,visaul verification and javascript, PLEASE UPGRADE!
o Changed the ManagePermission for compatibility purpose
o Added translation for Spanish Es and Spanish Es-utf8

3.1 - 01 December 2008

o Re-Build all the mod . I simplify the code and the two bugs in the admin panel are fixed.

3.0.3 - 28 November 2008

o Fixed "8: Undefined index: drc_option" Error in the Error Logs with another method thanks to Bulakbol.
o Renamed a function from disable_right_click2 to disable_right_click_mute

3.0.2 - 27 November 2008

o Fixed "8: Undefined index: drc_option" Error in the Error Logs.
o Fixed some others little bugs in the code.

3.0.1 - 20 November 2008

o Fixed a little bug in the admin panel.

3.0 - 23 October 2008

o Added support for SMF 2.0 BETA 4.
o Now you can select "Show a Message" or "Dont Show Nothing" when the user make a right click.
o Added the Right Click permission in the SMF Permission system.
o Auto-Template , this mod work in all the themes.
o Added portuguese and spanish with utf8.
o Moved the Right Click Mod settings.
o Fixed some little bugs.
o Now the mod protect the images directory with an empty index.php.

2.0 - 17 June 2008

o Added support for SMF BETA 2.0.
o Now you can disable or enable the right click in your admin panel.
o Added a little window with help
o Now the mod is called "Disable Right Click"

1.0 - 26 April 2008

o Initial release.

1.0 - 20 April 2008

o Initial private release.




I have now taken over responsibility for this mod.

The Mod has been updated and tested. Now works correctly on 1.1.xx (Tested on 1.1.16 but should work with earlier versions). Also works correctly on 2.0.xx (Tested on 2.0.2).

Tested with Firefox, Chrome, Safari, Opera and IE (All current versions) on a Windows PC.

I have changed some of the wording for the English language installs but if anyone wants to amend or add a new language, please post your language file text strings like this:

Code: [Select]
// Disable Right Click BY: Chas Large
$txt['arrange_drc'] = 'Deshabilita el click derecho para determinados grupos de usuarios';
$txt['drc_msg'] = 'Mostrar un mensaje personalizado como error';
$txt['drc_message2'] = 'Lo Sentimos, pero el click derecho esta desactivado';
$txt['drc_title'] = 'Escribe el mensaje personalizado (Puedes dejar esto vacio)';
$txt['drc_exception'] = 'Selecciona si quieres deshabilitar el mod en determinadas acciones<br /><span class="smalltext">Separa cada accion con comas (login,register,..)</span>';
$txt['permissionname_right_click'] = 'Click Derecho';
$txt['permissionhelp_right_click'] = 'Este permiso determina si los usuarios de este grupo de miembros pueden usar el click derecho.';

and

Code: [Select]
// Disable Right Click BY: Chas Large
$helptxt['drc_msg'] = 'Activalo para mostrar un mensaje personalizado cuando el usuario haga el click derecho';
$helptxt['drc_title'] = 'Escribe el mensaje personalizado que sera mostrado, solo funciona s&iacute; la opci&oacute;n "Mostrar un mensaje personalizado como error" esta seleccionada';

Enjoy and please let me know if you're happy with the mod or have any problems.
« Last Edit: January 14, 2012, 05:29:37 AM by Chas Large »
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Offline Cobra97

  • Semi-Newbie
  • *
  • Posts: 71
  • Gender: Male
    • Bachelor's Grove Paranormal Forums
Re: No right click
« Reply #1 on: May 07, 2008, 08:49:26 PM »
THANK YOU, I have wanted this for a while...............Keeps guests from stealing icon's and avatars.  I had a no right click installed before, but my members couldn't right click either....made using the forum to hard.

Thanks again.....Great Job!

Offline Joomlamz

  • SMF Hero
  • ******
  • Posts: 2,629
  • Gender: Male
  • Suporte SmfPT
    • apllicmz on Facebook
    • apllicmz on GitHub
    • https://www.linkedin.com/in/aplic on LinkedIn
    • @aplichosting on Twitter
    • Webdesign
Re: No right click
« Reply #2 on: May 07, 2008, 10:00:02 PM »
Good Work
translate to portuguese and brazilian

Code: [Select]
<file name="$languagedir/Modifications.portuguese.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
$txt['no_click'] = 'Desculpa , mas esta desativado o botão direito para Visitantes';
]]></add>
</operation>
</file>
<file name="$languagedir/Modifications.brazilian.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
$txt['no_click'] = 'Desculpa , mas esta desativado o botão direito para Visitantes';
]]></add>
</operation>
</file>


Support Utf8

Code: [Select]
<file name="$languagedir/Modifications.portuguese-utf8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
$txt['no_click'] = 'Desculpe, mas o bot&atilde;o direito esta desativado para Visitantes';
]]></add>
</operation>
</file>
<file name="$languagedir/Modifications.brazilian-utf8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
$txt['no_click'] = 'Desculpe, mas o bot&atilde;o direito esta desativado para Visitantes';
]]></add>
</operation>
</file>




Offline karlbenson

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,629
  • Gender: Male
    • Criminal Brief UK
Re: No right click
« Reply #3 on: May 07, 2008, 10:20:16 PM »
Without meaning to disappoint folk.

I've yet to come across any anti-copy/paste/scraping technique that cannot be defeated.
There are a million ways around it. (not least temporarily disable javascript).

Offline Cobra97

  • Semi-Newbie
  • *
  • Posts: 71
  • Gender: Male
    • Bachelor's Grove Paranormal Forums
Re: No right click
« Reply #4 on: May 07, 2008, 10:21:43 PM »
Without meaning to disappoint folk.

I've yet to come across any anti-copy/paste/scraping technique that cannot be defeated.
There are a million ways around it. (not least temporarily disable javascript).

I know that, but this will stop the people that don't know much............There's no way to stop it all.

Offline FerociousSM

  • Semi-Newbie
  • *
  • Posts: 42
  • Gender: Male
  • I'm a ferocious llama!
Re: No right click
« Reply #5 on: May 08, 2008, 02:54:23 AM »
How do I turn it ON?

Offline edi67

  • SMF Hero
  • ******
  • Posts: 1,532
  • Gender: Male
  • Italian Supporter
    • CrazyZone
Re: No right click
« Reply #6 on: May 08, 2008, 06:45:03 AM »
intersting
CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

Offline chrisb

  • Jr. Member
  • **
  • Posts: 214
Re: No right click
« Reply #7 on: May 08, 2008, 08:37:20 AM »
It would be nice if in admin you can turn on or off as you please ?

How can you change what it says in the script as well?


« Last Edit: May 08, 2008, 09:03:03 AM by chrisb »

Offline karlbenson

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,629
  • Gender: Male
    • Criminal Brief UK
Re: No right click
« Reply #8 on: May 08, 2008, 12:27:53 PM »
Change the language string that was added to Themes/default/languages/Modifications.english.php

Offline Sabre™

  • SMF Hero
  • ******
  • Posts: 2,527
  • Gender: Male
  • IF IT AINT BROKE, I CAN FIX IT TILL IT IS!!
Re: No right click
« Reply #9 on: May 09, 2008, 06:12:42 PM »
Good mod mate. :)
Ive still got the script from Dynamic Drive installed in my forum  lol
But yours has the pop message, and this I like :)

How would I make this active for a specific member group, aswell as guests?

Thankyou in advance
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Offline 2pac

  • Jr. Member
  • **
  • Posts: 235
  • Gender: Male
  • Str8 Ballin'
Re: No right click
« Reply #10 on: May 09, 2008, 06:47:16 PM »
hey, how can i make it specific to one certain board?

i know there's gotta be some way to incorporate board id into the if statement, but i dont know. anybody?

Offline Nibogo

  • SMF Hero
  • ******
  • Posts: 6,663
  • Gender: Male
    • smfpacks on Facebook
    • @smfpacks on Twitter
    • SMFPacks
Re: No right click
« Reply #11 on: May 09, 2008, 09:08:36 PM »
Thanks for you comments , i gonna try to update to make a better mod :)

How do I turn it ON?

You only need to upload the mod to the package manager and install

after of this you have the mod ON

Good mod mate. :)
Ive still got the script from Dynamic Drive installed in my forum  lol
But yours has the pop message, and this I like :)

How would I make this active for a specific member group, aswell as guests?

Thankyou in advance

i am making some test to have the option of block the Right Clicks of a group

Without meaning to disappoint folk.

I've yet to come across any anti-copy/paste/scraping technique that cannot be defeated.
There are a million ways around it. (not least temporarily disable javascript).

Is true but this method is a nice option to block a lot of Right Clicks

Offline xrunner

  • Sophist Member
  • *****
  • Posts: 1,019
  • Gender: Male
  • Karma +584/-1
Re: No right click
« Reply #12 on: May 09, 2008, 09:17:40 PM »
I'm running Firefox under Ubuntu Linux. When you right-click as a guest, the denial message comes up but after that the regular right-click menu is still accessible after the first dialog box goes away.

Offline Sabre™

  • SMF Hero
  • ******
  • Posts: 2,527
  • Gender: Male
  • IF IT AINT BROKE, I CAN FIX IT TILL IT IS!!
Re: No right click
« Reply #13 on: May 09, 2008, 09:22:04 PM »
i am making some test to have the option of block the Right Clicks of a group

Thanks mate, look forward to seeing your result :)


EDIT
try this
Code: [Select]
global $context, $user_info;
$groups = array(ADD MEMBER GROUPS HERE eg.  1,2,5);

if ($context['user']['is_guest'] || array_intersect($groups, $user_info['groups']))
echo '

The membergroup number, MUST be the group number, NOT the post count group number.

Thanks to the TP community for their guidance!!
« Last Edit: May 09, 2008, 10:41:42 PM by Sabre™ »
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Offline Bulakbol

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,220
  • Gender: Male
  • JohnyB
Re: No right click
« Reply #14 on: May 10, 2008, 01:58:55 AM »
I am using a single line "no right click" for guests. No message that will popup though.

Code: [Select]
<body ', $context['user']['is_guest'] ? 'oncontextmenu="return false;"' : '', '>';
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Offline Nibogo

  • SMF Hero
  • ******
  • Posts: 6,663
  • Gender: Male
    • smfpacks on Facebook
    • @smfpacks on Twitter
    • SMFPacks
Re: No right click
« Reply #15 on: May 10, 2008, 04:13:44 PM »
I'm running Firefox under Ubuntu Linux. When you right-click as a guest, the denial message comes up but after that the regular right-click menu is still accessible after the first dialog box goes away.

I am in ubuntu with firefox and when i go to:

http://www.nibogo.my-place.us

and make the right click appear the message and after of this i make another right click an the pop-up window appear again :)

Also i visit:

http://www.atheistthinktank.net/thinktank/index.php

and a make a right click an appear the pop-up window after of this i make another right click and appear again  ;D

Offline xrunner

  • Sophist Member
  • *****
  • Posts: 1,019
  • Gender: Male
  • Karma +584/-1
Re: No right click
« Reply #16 on: May 10, 2008, 06:30:28 PM »
I am in ubuntu with firefox and when i go to:

http://www.nibogo.my-place.us

Nope, does exactly the same thing at your site.
I'm running ubuntu hardy heron. The problem does not happen on my windows machine, only on linux using firefox v3.0b5

Offline Dannii

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,212
  • Mind the volcano!
    • curiousdannii on GitHub
Re: No right click
« Reply #17 on: May 10, 2008, 11:21:13 PM »
Stupid, stupid mod! Shame on you all.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Offline Sabre™

  • SMF Hero
  • ******
  • Posts: 2,527
  • Gender: Male
  • IF IT AINT BROKE, I CAN FIX IT TILL IT IS!!
Re: No right click
« Reply #18 on: May 11, 2008, 01:26:04 AM »
Tell that to the staff here at the site you cherish soo much, that gave it the thumbs up.

Some of us use it to play jokes with our users(because we have a sense of humour), and others as a door to other opportunities.

Common sense states, that if you have nothing nice to say, then shut your trap!!
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Offline Nibogo

  • SMF Hero
  • ******
  • Posts: 6,663
  • Gender: Male
    • smfpacks on Facebook
    • @smfpacks on Twitter
    • SMFPacks
Re: No right click
« Reply #19 on: May 11, 2008, 12:27:16 PM »
Stupid, stupid mod! Shame on you all.

i dont care what do you think about my mod , please go away and dont say stupid things in this forum ;)