Visitors post comments and they live sometimes their contact information like email address to get feedback. If you display e-mail spambots will catch them before other visitors. If you dont display, other visitors cannot send feedback. What is the secure anti-spam solution?
Here is what I did:
- email adresse of comment-poster will just partly shown to other anonym visitors (and with a tip to register to see full email)
- email adresse of comment-poster will shown to other registered visitors fully
To do that I need to change Druplas core comment-module and add a couple of php lines.
public_html/modules/comment/comment.tpl.php
if($comment->mail) {
$comment_posters_name = str_replace("Guest ", "", $comment->name);
$comment_posters_mail = $comment->mail;
$comment_posters_mail2 = preg_replace("#(.*@..)(.*)#sim", "$1", $comment_posters_mail);
if($user->uid){
echo "
E-Mail Addresse of $comment_posters_name is: $comment_posters_mail
";
} else {
echo "
E-Mail Addresse of $comment_posters_name({$comment_posters_mail2}...) is just for < a href=\"/user/register\">registered users< /a> available!
";
}
}
?>
- Log in to post comments