First, I hope I am allowed to post a MOD here. Since I have a New Topic Button available I assumed it was ok. If not, feel free to delete. Anyway, as you know, when someone posts an email in a post, if it's a forum that guests can read, then you know that SPAM bots can also read it, right? Well, years ago I had a Mod in my old Threads 6.X that someone else wrote which would hide any email addresses in posts unless you were logged in. If you were not logged in, all you would see was [login to view email] (or whatever message you want). So I can't take full credit for this MOD because I only modified it to work with 7.1 - and it works great! (It may work with other versions as well).
Ok, first, as you know, there are two ways a member can post an email in a post and they both require different methods to "hide" from the spam bots. The first method is when a member just types in the email directly in the post (does not use the "Mail" icon). In this case, we want to replace the "@" with a picture of an "@", So, simply make a small .gif of an "@" and put it in your appropriate images directory on your server. Then, in the Features Settings in the Control Panel, go to the Active Text tab and put this (I'm using PhP tags, but I know this isn't PhP):
@|<img src="http://www.yourwebsite.com/yourforumdir/images/general/default/atsign.gif">
(Replace yourwebsite with your domain name and yourforumdir with the name of the directiry for your Threads install)
This way, if someone types in an email address directly in a post, the members can still "see" the email address, but the "@" is replaced with an image so the email address is not clickable, but also SPAM bots don't see it as an email address.
Ok, the second way a member can put an email address in a post is to use the "Mail" icon in the edit buttons. This works a little different and requires some code added to your showflat.inc.php file in the /scripts dir. (This assumes that your default style is "showflat" and not "Threaded" because the spam bots will see threads in flat mode if that is the default. I suspect a similer mod can be made to showthreaded.inc.php if necessary.
In showflat.inc.php, find this piece of code:
$edit_now = time();
$edit_window = $config['MAX_EDIT_TIME'] * 60;
Then, just above that , add this code:
if(!$user['USER_DISPLAY_NAME'] || $user['USER_DISPLAY_NAME']==""){
$Body = preg_replace("/<a href=("|")mailto:(.*?)("|")>(.*?)<\/a>/i","<B>[Login to view email]</B>",$Body);
}
You can change the [Login to view email] to whatever you want it to say. This is what a guest (or spam bot) will see if someone has used the mail button to post a "mailto:" email address in a post. Anyone who is logged in of course, will see the actual email address (and it will be clickable).
Hope this is useful. I feel that protecting email addresses in posts from spam bots a a good service to provide to our members.
Basil