Disable Right Click (v4.0 Released!)

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

Previous topic - Next topic

Matthew K.

Congratulations! Thanks for helping out the mod community :)

Apllicmz

Yes nice work
when Update dont forget portuguese and brazilian

<file name="$languagedir/Modifications.portuguese_pt.php" error="skip">
    <operation>
        <search position="end" />
            <add><![CDATA[
// Disable Right Click BY: Chas Large translate by Candidosa2
$txt['arrange_drc'] = 'Desactivar o bot&atilde;o direito para grupo de membro selecionados';
$txt['drc_msg'] = 'Mostrar uma mensagem personalizada de erro';
$txt['drc_message2'] = 'Desculpe, o bot&atilde;o direito do mouse para o clique est&aacute; desactivado';
$txt['drc_title'] = 'Digite sua mensagem personalizada (Voc&ecirc; pode deixar este vazio)';
$txt['drc_exception'] = 'Definir isto se voc&ecirc; quiser desativar o mod em ac&ccedil;ões seleccionadas<br /><span class="smalltext">Separar cada ac&ccedil;&atilde;o com vírgulas (Entrar,registo,..)</span>';
$txt['permissionname_right_click'] = 'Clique bot&atilde;o direito';
$txt['permissionhelp_right_click'] = 'Esta permiss&atilde;o determina se os utilizadores deste grupo de membro pode fazer o clique direito do bot&atilde;o no seu fórum.';
]]></add>
    </operation>
</file>
<file name="$languagedir/Help.portuguese_pt.php" error="skip">
    <operation>
        <search position="end" />
            <add><![CDATA[
// Disable Right Click BY: Chas Large Support SMFPT
$helptxt['drc_msg'] = 'Se voc&ecirc; quer mostrar uma mensagem personalizada quando um utilizador sem essa permiss&atilde;o vire à direita, marque esta op&ccedil;&atilde;o';
$helptxt['drc_title'] = 'Digite o mensagem personalizada de que pretende mostrar como a mensagem de erro';
]]></add>
    </operation>
</file>
<file name="$languagedir/Modifications.portuguese_brazilian-utf8.php" error="skip">
    <operation>
        <search position="end" />
            <add><![CDATA[
// Disable Right Click BY: Chas Large translate by Candidosa2
$txt['arrange_drc'] = 'Desactivar o bot&atilde;o direito para grupo de membro selecionados';
$txt['drc_msg'] = 'Mostrar uma mensagem personalizada de erro';
$txt['drc_message2'] = 'Desculpe, o bot&atilde;o direito do mouse para o clique est&aacute; desactivado';
$txt['drc_title'] = 'Digite sua mensagem personalizada (Voc&ecirc; pode deixar este vazio)';
$txt['drc_exception'] = 'Definir isto se voc&ecirc; quiser desativar o mod em ac&ccedil;ões seleccionadas<br /><span class="smalltext">Separar cada ac&ccedil;&atilde;o com vírgulas (Entrar,registo,..)</span>';
$txt['permissionname_right_click'] = 'Clique bot&atilde;o direito';
$txt['permissionhelp_right_click'] = 'Esta permiss&atilde;o determina se os utilizadores deste grupo de membro pode fazer o clique direito do bot&atilde;o no seu fórum.';
]]></add>
    </operation>
</file>
<file name="$languagedir/Help.portuguese_pt-utf8.php" error="skip">
    <operation>
        <search position="end" />
            <add><![CDATA[
// Disable Right Click BY: Chas Large Support SMFPT
$helptxt['drc_msg'] = 'Se voc&ecirc; quer mostrar uma mensagem personalizada quando um utilizador sem essa permiss&atilde;o vire à direita, marque esta op&ccedil;&atilde;o';
$helptxt['drc_title'] = 'Digite o mensagem personalizada de que pretende mostrar como a mensagem de erro';
]]></add>
    </operation>
</file>
<file name="$languagedir/Modifications.portuguese_brazilian.php" error="skip">
    <operation>
        <search position="end" />
            <add><![CDATA[
// Disable Right Click BY: Chas Large translate by Candidosa2
$txt['arrange_drc'] = 'Desactivar o bot&atilde;o direito para grupo de membro selecionados';
$txt['drc_msg'] = 'Mostrar uma mensagem personalizada de erro';
$txt['drc_message2'] = 'Desculpe, o bot&atilde;o direito do mouse para o clique est&aacute; desactivado';
$txt['drc_title'] = 'Digite sua mensagem personalizada (Voc&ecirc; pode deixar este vazio)';
$txt['drc_exception'] = 'Definir isto se voc&ecirc; quiser desativar o mod em ac&ccedil;ões seleccionadas<br /><span class="smalltext">Separar cada ac&ccedil;&atilde;o com vírgulas (Entrar,registo,..)</span>';
$txt['permissionname_right_click'] = 'Clique bot&atilde;o direito';
$txt['permissionhelp_right_click'] = 'Esta permiss&atilde;o determina se os utilizadores deste grupo de membro pode fazer o clique direito do bot&atilde;o no seu fórum.';
]]></add>
    </operation>
</file>
<file name="$languagedir/Help.portuguese_pt.php" error="skip">
    <operation>
        <search position="end" />
            <add><![CDATA[
// Disable Right Click BY: Chas Large Support SMFPT
$helptxt['drc_msg'] = 'Se voc&ecirc; quer mostrar uma mensagem personalizada quando um utilizador sem essa permiss&atilde;o vire à direita, marque esta op&ccedil;&atilde;o';
$helptxt['drc_title'] = 'Digite o mensagem personalizada de que pretende mostrar como a mensagem de erro';
]]></add>
    </operation>
</file>
<file name="$languagedir/Modifications.portuguese_brazilian-utf8.php" error="skip">
    <operation>
        <search position="end" />
            <add><![CDATA[
// Disable Right Click BY: Chas Large translate by Candidosa2
$txt['arrange_drc'] = 'Desactivar o bot&atilde;o direito para grupo de membro selecionados';
$txt['drc_msg'] = 'Mostrar uma mensagem personalizada de erro';
$txt['drc_message2'] = 'Desculpe, o bot&atilde;o direito do mouse para o clique est&aacute; desactivado';
$txt['drc_title'] = 'Digite sua mensagem personalizada (Voc&ecirc; pode deixar este vazio)';
$txt['drc_exception'] = 'Definir isto se voc&ecirc; quiser desativar o mod em ac&ccedil;ões seleccionadas<br /><span class="smalltext">Separar cada ac&ccedil;&atilde;o com vírgulas (Entrar,registo,..)</span>';
$txt['permissionname_right_click'] = 'Clique bot&atilde;o direito';
$txt['permissionhelp_right_click'] = 'Esta permiss&atilde;o determina se os utilizadores deste grupo de membro pode fazer o clique direito do bot&atilde;o no seu fórum.';
]]></add>
    </operation>
</file>
<file name="$languagedir/Help.portuguese_brazilian-utf8.php" error="skip">
    <operation>
        <search position="end" />
            <add><![CDATA[
// Disable Right Click BY: Chas Large Support SMFPT
$helptxt['drc_msg'] = 'Se voc&ecirc; quer mostrar uma mensagem personalizada quando um utilizador sem essa permiss&atilde;o vire à direita, marque esta op&ccedil;&atilde;o';
$helptxt['drc_title'] = 'Digite o mensagem personalizada de que pretende mostrar como a mensagem de erro';
]]></add>
    </operation>
</file>




Chas Large

Quote from: Joomlamz on January 14, 2012, 01:12:00 AM
Yes nice work
when Update dont forget portuguese and brazilian
...

Thanks for that, I'll add that in next time :)
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.

Chas Large

Quote from: Labradoodle-360 on January 13, 2012, 06:13:06 PM
Congratulations! Thanks for helping out the mod community :)

Always happy to help :)
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.

Chas Large

Updated with Portuguese and Brazilian translations, thanks to Joomlamz.
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.

davegior

Great to hear you took over the mod Chas. Congrats.

Do I need to remove the previous version or can I over install.

davegior

I was about to uninstall version 4.0 but during the test prior I received this:

Replace    ./Sources/ManageSettings.php    Test failed

Chas Large

#287
Quote from: davegior on January 14, 2012, 08:23:47 AM
Great to hear you took over the mod Chas. Congrats.

Do I need to remove the previous version or can I over install.

Sorry, missed your post. Didn't have notify set, have now though.

Yes, always uninstall a mod unless the readme says you can over install. Very few mods do an update due to possible errors in the uninstall. (and anyway, I'm just too lazy to program that in :D )

Quote from: davegior on January 14, 2012, 10:03:18 AM
I was about to uninstall version 4.0 but during the test prior I received this:

Replace    ./Sources/ManageSettings.php    Test failed

Most likely, another mod has added code into the same area and therefore the uninstaller cannot find the disable right click code to remove it.

Post your ManageSettings.php file here as an attachment and I'll clean up the code so you can install the latest version.
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.

davegior

Thank you very much Chas.
Question, if the code is cleaned up, will effect the mod that added code to it?

Chas Large

Quote from: davegior on January 14, 2012, 11:52:06 AM
Thank you very much Chas.
Question, if the code is cleaned up, will effect the mod that added code to it?

File cleaned of old Disable Right Click code attached.

In answer to your question, no, it shouldn't but it might :-\ The area where this erroneous code resided is an area for modders to place items of code. We're told to add it in the same place, i.e., under another piece of identifying code so when mod #1 placed code there, it's correct. Mod #2 is installed and consequently pushes the code for mod #1 down. Now the uninstall procedure for mod #1 looks for the same place as where it installed the code in the first place but since it was installed, mod # 2 has changed things and therefore mod # 1 can't find the original code where it was originally placed and throws an error. I hope that clarifies things for you. Of course, adding the new version may give uninstall errors for the two other mods you have which have placed code in that area.

The developers are working on new ways to solve this issue and one day adding mods will (hopefully) be totally transparent to the original source code so uninstalls should always work. When that day will be is anyone's guess right now but in the meantime if you get any such problems with any of my mods, just post on the support topic like here and I'll sort it out for you :)
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.

davegior

Thanks again Chas, I'll give a shot and post the results.

Matthew K.

@Chas - Using hooks eliminates the problem of conflicting modifications. Most of the prominent arrays that mods call, already have hooks.

Chas Large

Quote from: Labradoodle-360 on January 14, 2012, 12:12:54 PM
@Chas - Using hooks eliminates the problem of conflicting modifications. Most of the prominent arrays that mods call, already have hooks.
Yup, new that ;)

Is there one for ManageSettings where code normally follows

// Mod authors, add any settings UNDER this line.......
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.

Matthew K.

Yeah, there is. I'm going to shoot you a PM.

davegior

Works great Chas, thank you so much for your help.

StreamX

#295
Russian-utf8
<file name="$languagedir/Modifications.russian-utf8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
// Disable Right Click BY: Chas Large
$txt['arrange_drc'] = 'Отключение правой кнопкой мыши для конкретных групп пользователей';
$txt['drc_msg'] = 'Показать пользовательские сообщения, как ошибка';
$txt['drc_message2'] = 'Извините, но правая кнопка мыши отключена';
$txt['drc_title'] = 'Написать собственное сообщение (Вы можете оставить это пустое)';
$txt['drc_exception'] = 'Выберите, если вы хотите отключить мод в определенных действиях<br /><span class="smalltext">Отделите каждое действие запятыми (login,register,..)</span>';
$txt['permissionname_right_click'] = 'Щелкните правой кнопкой мыши';
$txt['permissionhelp_right_click'] = 'Это разрешение определяет, могут ли пользователи в этой группе использовать правую кнопку мыши.';
]]></add>
</operation>
</file>
<file name="$languagedir/Help.russian-utf8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
// Disable Right Click BY: Chas Large
$helptxt['drc_msg'] = 'Включить для отображения пользовательского сообщения, когда пользователь щелкает правой кнопкой мыши';
$helptxt['drc_title'] = 'Написать собственное сообщение, которое будет отображаться, работает, только если выбран "Показывать собственное сообщение"';
]]></add>
</operation>
</file>

Chas Large

Thanks StreamX will include in next update :)
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.

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.

davegior

I posted this question in the SMF 2.x Support thread and I was told to post my question in this thread.

Error Log Undefined Error in subs.php

I'm running SMF 2.0.2. receiving "8: Undefined index: html_headers" in Subs.php for all Guests on Avatars and Images on Line 4306 which is ==>4306:        $context['html_headers'] .= '
Subs.php is attached.
Mods installed are:
Improved Webmaster Email Settings 1.1
SmileyLimit 1.1
SMF 2.0.1 Update
Stop Spammer 2.3.9
Show Joined, Location, Username In Topic View 1.0
httpBL 2.5.1
Add Facebook Like to Posts 1.1 (disabled)
SMF 2.0.2 Update
Disable Right Click 4.1.0
Simple Audio Video Embedder 2.0.4
Search Focus Dropdown 1.6.1
Alt Characters v1.7

Any help would greatly be appreciated.

Chas Large

Quote from: davegior on March 22, 2012, 09:18:29 AM
I posted this question in the SMF 2.x Support thread and I was told to post my question in this thread.

Error Log Undefined Error in subs.php

I'm running SMF 2.0.2. receiving "8: Undefined index: html_headers" in Subs.php for all Guests on Avatars and Images on Line 4306 which is ==>4306:        $context['html_headers'] .= '
Subs.php is attached.
Mods installed are:
Improved Webmaster Email Settings 1.1
SmileyLimit 1.1
SMF 2.0.1 Update
Stop Spammer 2.3.9
Show Joined, Location, Username In Topic View 1.0
httpBL 2.5.1
Add Facebook Like to Posts 1.1 (disabled)
SMF 2.0.2 Update
Disable Right Click 4.1.0
Simple Audio Video Embedder 2.0.4
Search Focus Dropdown 1.6.1
Alt Characters v1.7

Any help would greatly be appreciated.
Can you post a copy of your subs.php file (as an attachment) here so I can look at it please?

BTW, the mod is at 4.1.2 right now
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.

Advertisement: