Topic: Can I remove the email link?
I want to make it impossible for my visitors to email each other. How can I remove the email links from the poster info areas of messages?
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.2 discussion → Can I remove the email link?
I want to make it impossible for my visitors to email each other. How can I remove the email links from the poster info areas of messages?
Quick and dirty would be to open up viewtopic.php, find the line "// Now let's deal with the contact links (E-mail and URL)" (around line 250), and then remove the code following it:
if (($cur_post['email_setting'] == '0' && !$pun_user['is_guest']) || $pun_user['g_id'] < PUN_GUEST)
$user_contacts[] = '<a href="mailto:'.$cur_post['email'].'">'.$lang_common['E-mail'].'</a>';
else if ($cur_post['email_setting'] == '1' && !$pun_user['is_guest'])
$user_contacts[] = '<a href="misc.php?email='.$cur_post['poster_id'].'">'.$lang_common['E-mail'].'</a>';If you didn't want them to be able to e-mail each other at all, it would require additional hacking around in the user profiles..
Thanks for that.
I do want to find a way to prevent them from emailing each other, as the users will be university students and I am obliged to respect their privacy. I intend to let them exchange email addresses via private messages, but I don't want it possible for anyone's email address be revealed by users emailing each other within the punBB interface.
They are unlikely to bother to tweak their profiles, so I do need a down-and-dirty way to stop emailing, and removing the link is as dirty as it gets!
but I do want it possible for anyone's email address be revealed by users emailing each other within the punBB interface.
Do or don't? ![]()
If don't, then in profile.php, try taking out the following code (around line 959):
<dt><?php echo $lang_common['E-mail'] ?>: </dt>
<dd><?php echo $email_field ?></dd>And then, I think you'd be pretty much set. This bit of code in the profile doesn't show e-mail addresses initially. But when person A sends an e-mail, then the reciever sees A's e-mail address.. So it's not particularly visible or public. But yeah, whatever works best.
Many thanks Zeke - the mods to viewtopic.php and profile.php have removed all the email links.
PunBB Forums → PunBB 1.2 discussion → Can I remove the email link?
Powered by PunBB, supported by Informer Technologies, Inc.