MyBB Community Forums

Full Version: Break Email Links
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Description
Breaks email links in posts, replaces @ with [at] and removes the actual link if one exists, i.e. if using [email] BBCode.

Download
http://mods.mybb.com/view/break-email-links

Install
1. Upload the breakemaillinks.php to ./inc/plugins
2. Activate in the ACP >> Configuration >> Plugins

Upgrade (All Versions)
Upload breakemaillinks.php to ./inc/plugins/ overwriting the existing file. (No need to deactivate)

License
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Credits
Thanks to - G33K - for the code he contributed to this plugin.

Support
Post any problems/bugs in this thread. Smile
Is this not the same as using the word filter function? Filtering @ and replacing with [at]
Using the word filter won't affect email addresses.

This also removes the link, [[email protected]]send me an email[/email], [email][email protected][/email] and [email protected] all become example[at]mybb.com with this plugin.
its really helpful one , as this plugin hide emails from email crawlers for spam mailing ,

i used its by Word filter in Mybb 1.4 , but for 1.6 Word Filter not work for @ , so this plugin is essential one
Nice plugin. May I make a small suggestion though?

	$search = "/([a-zA-Z0-9&*+\-_.{}~^\?=\/]+)@([a-zA-Z0-9-]+)\.(([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]{2,})/si";
	$replace = '$1[AT]$2.$3';
	$message = preg_replace($search, $replace, $message);

To target only valid email addresses and not all @s in a post. The above would replace the bottom section of the function.
Thanks for that, I've implemented it into v1.2 which is now on the mods site. Smile
Thanks for the credit, it wasn't necessary but its appreciated. Wink