News:

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

Main Menu

Hide all email addresses from public

Started by Tom, July 03, 2004, 02:02:19 PM

Previous topic - Next topic

Tom

I've had some problems with a spammer. I've already disabled the members list and made it so only registered members can view profiles, but they are still persistent. I'd like to avoid disabling the viewing of profiles alltogether (which I know would solve the problem) so if someone could tell me what code to change / remove to make it so no email addresses are shown to the public, it would be greatly appreciated.

Thanks.

Tom

Ok, I must not be thinking right today. I went to disable profile viewing for all members, like what I have currently for unregistered members, so that email addresses are not shown. (Just as a temporary thing.) I must have forgotten that the are multiple options, and I can't seem to get it so that you can't see email addresses. I can get it so you can't view someone's profile, but the email address is still visible. ???

Thanks again.

[Unknown]

There's a setting to not show email addresses to guests, but it may be Beta 6 and above only.

-[Unknown]

Grudge

and I don't think there is anyway to stop showing email addresses to members...

Can you not just ban the member in question who is doing it? You could otherwise remove the email addresses from display manually by opening up display.template.php searching for 'email' and removing that line...
I'm only a half geek really...

Amacythe

You could make a post to your members about what's happened (omitting names of course) and suggest that they go to their own profiles and hide their own email address.

Tom

Ok thanks guys.

How about just making it so "Hide email from public" when you resister is checked by deafult.

Grudge

You could do that. I believe the register function will automatically handle storing any variable you add to the register template so you could add a checkbox/hidden variable with hideEmail as the name to the template and it will automatically be stored. Hope that made sense...
I'm only a half geek really...

Tom

No, sorry I'm not quite understanding.  :-[

Puc conDoin

When you hide e-mail adresses for all of your members, is it still possible for them to mail eachother? E.g. via some sort of mailform?

Burpee

Quote from: Grudge on July 04, 2004, 05:56:44 AM
and I don't think there is anyway to stop showing email addresses to members...

Can you not just ban the member in question who is doing it? You could otherwise remove the email addresses from display manually by opening up display.template.php searching for 'email' and removing that line...

This isn't the best way to do it now is it?
Anyway, I need to have this option pretty badly... installed the board last night and didn't realize that during the transport all the "hide email" settings had been lost, so now I'm getting a whole flood of extremely paranoia people complaining about their email showing...
been looking through the templates and I found 413 occurences of the word email in there... even if only half of those actually show the email that's still too much to do by hand...

Grudge

I'm still a little confused. why not just run this query in phpmyadmin?


UPDATE smf_members SET hideEmail = 1


that will hide all your members emails completly to everyone who isn't an admin. Is that enough?
I'm only a half geek really...

Burpee

Fixed it completely...

*owes Grudge*

You kept away the horde of paranoia criminals that were starting to threaten me if I didn't fix this... :D

I think I'm gonna go look through the entire board with phpMyAdmin... might learn something from that :D

Armada

To automatically hide all emails for new members, what you can do is modify the Register.template.php in the /Themes/default to have in it:

Quote
// Are they allowed to hide their email?
   if ($context['allow_hide_email'])
echo '
   <input type="hidden" name="hideEmail" value="on" />';

(replacing the "checkbox" version)
--- SMF Rocks even more than YabbSE---

Burpee


Tom

Quote from: Grudge on July 04, 2004, 05:56:44 AM
and I don't think there is anyway to stop showing email addresses to members...

Can you not just ban the member in question who is doing it? You could otherwise remove the email addresses from display manually by opening up display.template.php searching for 'email' and removing that line...

Sorry this is a couple of days late, but...

// Don't show the email address if they want it hidden.
if (empty($message['member']['hide_email']) || $context['allow_hide_email'] != 1)
echo '
<a href="mailto:', $message['member']['email'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/email_sm.gif" alt="' . $txt[69] . '" title="' . $txt[69] . '" border="0" />' : $txt[69]), '</a>';


Instead of removing ALL of that, would it just be possible to remove / change the if statment to make the email address hidden no matter what. I am asking this so the admins would still be able to see it, rather then even the admins not being able to see email addresses.

Thanks very much for your help.

[Unknown]

Find:

empty($message['member']['hide_email']) || $context['allow_hide_email'] != 1

Replace:

allowedTo('moderate_forum')

-[Unknown]

Tom

Thank you, thank you, thank you! :D

You replied so fast I barely had time to tell you my problem.  :P

Armada

- yes that works very nicely except if you unheck the "allow users to hide email addresses" (to get rid of the hide email option when they go to their profile) under the "Edit Features and Options" (in Admin) then suddenly everybody's emails is visible.  :-\

(mind you for somereason everybody who messes with the Accounts Settings part on their profile goes invisible on my board - but that's another thread! ;) )
--- SMF Rocks even more than YabbSE---

NoRad

I think it's a good idea to not display member Emails at all. Private Messages are a better option. Or, if you need EMail capabilities you can let SMF handle that using a form similar to private messaging...

Burpee

Hmm... I agree...
People should be protected from their own stupidity...

I have had a total of 6 spam mails in the last 2 years, mostly because I was smart enough to keep my email adress away from ALL webpages...

Advertisement: