I like.
- Step 1.
In member.php file,
find:
$user_email_save = str_replace("@", " at ", $user_row['user_email']);
replace with:
$user_email_save = (isset($user_row['user_email_appearance']) && $user_row['user_email_appearance'] == 0) ? $lang['user_email_show_profile_appearance'] : str_replace("@", " at ", $user_row['user_email']);
- Step 2.
In lang/english/main.php file,
find:
$lang['lost_password_msg'] = "In case you forgot your password, enter the email address you have used for registration.";
$lang['user_name'] = "Username:";
$lang['password'] = "Password:";
add below:
$lang['user_email_show_profile_appearance'] = "Send an email message";
$lang['user_email_appearance'] = "Allow other users to see my source email address";
- Step 3.
In includes/db_field_definitions.php file,
add above the
?> tag:
$additional_user_fields['user_email_appearance'] = array($lang['user_email_appearance'], "radio", 1);
- Step 4.
In templates/your_template/member_editprofile.html file,
find:
<tr>
<td class="row1"><b>{lang_show_email}</b></td>
<td class="row1">
<input type="radio" name="user_showemail" value="1"{user_showemail_yes} />
{lang_yes}
<input type="radio" name="user_showemail" value="0"{user_showemail_no} />
{lang_no}</td>
</tr>
add:
<tr>
<td class="row2"><b>{lang_user_email_appearance}</b></td>
<td class="row2">
<input type="radio" name="user_email_appearance" value="1"{user_email_appearance_yes} />
{lang_yes}
<input type="radio" name="user_email_appearance" value="0"{user_email_appearance_no} />
{lang_no}
</td>
</tr>
Then, create new SQL field called:
user_email_appearance, int(1), default(0) in your USERS_TABLE.
Go to your user control panel, choose the option you like for the email. Then, visit your profile page. Should work.