[FREE] Hide Email Address from public checked by Default instead

Started by Angie on Dialysis, March 05, 2009, 03:17:31 AM

Previous topic - Next topic

Angie on Dialysis

I noticed that when a member signs up their email is automatically showing to all members. This concerns me as my members, most of them frankly are not that computer savvy and therefore don't know how to even go into their profile and click to hide their emails. So I wondered if there was a way to make "Hide email address from public?" checked by default instead and they instead would have to uncheck the "Hide email address from public?" if they want it to show to members. (Of course staff would always be able to see: I.E. Administration and Global Mods).

I have searched and looked at other mods and temporarily am using a mod that hides all emails but I know some members do want their emails to show. So this is why I am asking.

Thanks ahead of time for any help on this!

Antechinus

I'm not up with writing mods but I can tell you how to edit the relevant file to get that result. If you're not confident doing the edit I'll do it for you.

For SMF 1.1.x find this in your Profile.template.php:

// If the user is allowed to hide their email address from the public give them the option to here.
if ($context['allow_hide_email'])
{
echo '
<tr>
<td width="40%"><b>', $txt[721], '</b></td>
<td><input type="hidden" name="hideEmail" value="0" /><input type="checkbox" name="hideEmail"', $context['member']['hide_email'] ? ' checked="checked"' : '', ' value="1" class="check" /></td>
</tr>';
}


Change it to this:

// If the user is allowed to hide their email address from the public give them the option to here.
if ($context['allow_hide_email'])
{
echo '
<tr>
<td width="40%"><b>', $txt[721], '</b></td>
<td><input type="hidden" name="hideEmail" value="0" /><input type="checkbox" name="hideEmail"', $context['member']['hide_email'] ? ' checked="checked"' : '', ' value="0" class="check" /></td>
</tr>';
}




Angie on Dialysis

Oh thank you! I knew it would be simple like that! I will try it thanks! :) (or more rather my fiance Sandman will try it who is also on this forum)

I would think value 1 would have it checked for it to be hidden and not the other way around ..

Sandmansa

Angie, I found this plugin much more effective for what your looking to do.

View Email Permissions

Angie on Dialysis

Quote from: Sandmansa on March 07, 2009, 01:21:37 AM
Angie, I found this plugin much more effective for what your looking to do.

View Email Permissions

That works for now but I wanted to give all my members still the option to make their emails viewable to other members if they so chose. I just didn't want it to be viewable by default as it is.

The mod you suggested Sandman is good for now because it will keep my members safe from email harvesters who successfully sign up as members however. Thanks.

dannyjp


Myself, I find the SMF User Email System mod very helpful in preventing harvesting of emails. You will be able to email somebody (via form) yet not know what the email address is. You will only find out what the email address is when that person emails you back. And yeah, you no longer have to hide emails although users still have the option of hiding theirs if they don't want to be emailed. Cool and very functional mod I should say. :)



Angie on Dialysis

Quote from: dannyjp on August 16, 2009, 05:39:10 AM

Myself, I find the SMF User Email System mod very helpful in preventing harvesting of emails. You will be able to email somebody (via form) yet not know what the email address is. You will only find out what the email address is when that person emails you back. And yeah, you no longer have to hide emails although users still have the option of hiding theirs if they don't want to be emailed. Cool and very functional mod I should say. :)




Is the captcha able to be as difficult as we set it in our forums?  Some bots can still bypass captcha security so just wondering.  If so then this is what I want to try out! Thanks ! :D

dannyjp

Quote from: Angie KidneyKorner on August 16, 2009, 05:49:49 AM
Is the captcha able to be as difficult as we set it in our forums?  Some bots can still bypass captcha security so just wondering.  If so then this is what I want to try out! Thanks ! :D

The built-in SMF CAPTCHA that I am using (high complexity setting) was not affected by the mod. It is still working normally. Haven't tried others like reCAPTCHA, though, so I am not in a position to confirm. I doubt that it would, however.  :)

Burtie

Hi,

I'm looking at doing the above as suggested by Antechinus - it seems a simple solution.....Thing is, is does not seem to be working for me.

I am using 1.1.10 with the Dilber theme. Please could you explain where I'm going wrong?

Arantor

Please can you provide a link to where you were referring to? It would normally be easier to answer it there - this board is for requesting new mod packages for SMF.
Holder of controversial views, all of which my own.


Burtie

Arantor,

My apologies if I have posted incorrectly. I was referring to Reply 1 in this topic.

Quote// If the user is allowed to hide their email address from the public give them the option to here.
      if ($context['allow_hide_email'])
      {
         echo '
                     <tr>
                        <td width="40%"><b>', $txt[721], '</b></td>
                        <td><input type="hidden" name="hideEmail" value="0" /><input type="checkbox" name="hideEmail"', $context['member']['hide_email'] ? ' checked="checked"' : '', ' value="0" class="check" /></td>
                     </tr>';
   }

When I make this change the check box remains unchecked.

Advertisement: