![]() |
Automatic email adress re-formatting to prevent harvesting
Hi everybody,
I am looking for a solution to have vBulletin automatically break up email addresses in postings to prevent address harvesting. So that if a user enters myname@domain.com, it would be "corrected" into myname @ domain.com or myname AT domain.com I guess there is a solution for this already in place so please point me towards it :-) Best, Tobias |
Good One!
|
I was expecting this to be easy, but maybe it's not. Should I post this under mod suggestions instead?
|
I've just thought it through and it's not that hard, use some preg functions to sort them out.
|
Quote:
|
Match a part of a string with @ followed by a . and make sure that they are alphanumeric.
|
OK, we are getting closer. I have no clue whatsoever about preg functions and would need a step-by-step type of explanation where and how to implement this. Any further help is appreciated :)
Thanks, Tobias |
Read up on regular expression.
|
I think spammers are fully aware of this and work-around it. There should never be a need to post emails in posts anyway.
|
It's not to prevent spammers. It's to prevent email-harvesting bots.
|
Ok, replace "spammers" with email-harvesting bots.
|
Okay then, despite what you think, it still prevents most of them.
|
I would say some not "most". vBullentin already has a contact form that spam bots cannot harvest user emails from. Condoning users posting their emails in posts (even in the manner described) is not responsible IMO.
Think about it, if were running a spam bot, wouldn't you work/design around such obvious tactics? |
Quote:
|
I'm only telling you to read up on regex because it wouldn't expand any of your knowledge if I did everything for you.
|
Quote:
|
You would need to add a plugin hooking at postbit_display_complete. The message's variable is $post['message'].
|
Seriously, if I would know how to add a plugin hooking to a template, I would very likely not have posted this question here in the first place ;)
|
Sometimes you just need to look......Admin CP > Plugins & Products > Add New Plugin.
|
Dismounted, if you know how to do this why not simply tell tobias_t rather than playing cryptic messages? Or perhaps you yourself don't know?
|
I have told him what he needs. You say I don't know how? Let me prove you wrong.
1/ Admin CP > Plugins & Products > Add New Plugin 2/ Hook Location: postbit_display_complete 3/ PHP Code: PHP Code:
|
No, I asked if you know how. That's what this (?) funny little character means :)
There ya go tobias_t, you just need to know how to ask :) |
Hahaha, that's awesome. Just gotta ask the right question I suppose ;)
|
Quote:
|
No, not all. I have no idea what you are capable of. However, you do seem to assume those asking questions have the same capabilities as you. Which would beg the question of why they would ask in the 1st place ;)
|
Quote:
I don't yet get it to work though - On our test server, installing this hack gives me this message on showthread: Parse error: syntax error, unexpected ';' in /srv/www/htdocs/forum/includes/class_postbit.php(296) : eval()'d code on line 1 On our live server, it does no changes to email addresses at all. Both installations are 3.6.6. Any ideas? |
PHP Code:
|
Quote:
name AT domain.com>name@domain.com |
:p cool a mod in the making ^^ go dismounted!
|
PHP Code:
|
Quote:
On our test server, it additionally gives the message: preg_replace() [function.preg-replace]: Unknown modifier 'a' in /includes/class_postbit.php(296) : eval()'d code (Zeile 1) Very exciting to be part of a mod development :D |
PHP Code:
|
Quote:
Thanks so much! :) |
All times are GMT. The time now is 02:54 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|