Customizing SMF > SMF Coding Discussion

Remove "Allow members to email me" thing on registration

(1/1)

wynnyelle:
How do I remove this, does anyone know? Is there a setting in permissions, or would it have to be done with a code?

Krash:

You can edit it out in Register.template.php.  Do you want it to default 'yes' or 'no'?

wynnyelle:
It should default to no.

Krash:

In Register.template.php find this:


--- Code: ---
<dt><strong><label for="allow_email">', $txt['allow_user_email'], ':</label></strong></dt>
<dd>
<input type="checkbox" name="allow_email" id="allow_email" tabindex="', $context['tabindex']++, '" class="input_check" />
</dd>


--- End code ---

Change to this:


--- Code: ---
<!--dt><strong><label for="allow_email">', $txt['allow_user_email'], ':</label></strong></dt-->
<dd>
<input type="hidden" name="allow_email" id="allow_email" tabindex="', $context['tabindex']++, '" class="input_check" />
</dd>


--- End code ---

Didn't check it, but should remove the option, and submit hidden value 'no' for all registrations.

wynnyelle:
Thank you so much!

Navigation

[0] Message Index

Go to full version