Thread Rating:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[For 1.6] Break Email Links
#1
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
Reply
#2
Is this not the same as using the word filter function? Filtering @ and replacing with [at]
[Image: hdoE.png]
m1ne.net - coming soon
Reply
#3
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.
Reply
#4
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
Reply
#5
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.
Reply
#6
Thanks for that, I've implemented it into v1.2 which is now on the mods site. Smile
Reply
#7
Thanks for the credit, it wasn't necessary but its appreciated. Wink
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)