News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Disable Right Click (v4.0 Released!)

Started by Chas Large, May 07, 2008, 07:10:11 PM

Previous topic - Next topic

Chas Large

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:

// 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

// 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.
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.

Cobra97

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!

Apllicmz

Good Work
translate to portuguese and brazilian

<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

<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>





karlbenson

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).

Cobra97

Quote from: karlbenson 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).

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

FerociousSM


edi67

CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

chrisb

#7
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?



karlbenson

Change the language string that was added to Themes/default/languages/Modifications.english.php

Sabre™

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 ;)


2pac

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?

Nibogo

#11
Thanks for you comments , i gonna try to update to make a better mod :)

Quote from: FerociousSM on May 08, 2008, 02:54:23 AM
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

Quote from: Sabre™ 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

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

Quote from: karlbenson 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).

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

xrunner

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.

Sabre™

#13
Quote from: NIBOGO on May 09, 2008, 09:08:36 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
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!!
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Bulakbol

I am using a single line "no right click" for guests. No message that will popup though.

<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

Nibogo

#15
Quote from: xrunner 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.

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

xrunner

Quote from: NIBOGO on May 10, 2008, 04:13:44 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

Dannii

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."

Sabre™

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 ;)



Advertisement: