|
Joined: Oct 2001
Posts: 139
Journeyman
|
Journeyman
Joined: Oct 2001
Posts: 139 |
I apologize if this idea has alread been discussed. I did do a search, but could not find it. This is an idea that I would really like to see implemented (and I'd be willing to help, though I'm not an expect at the finer points of PhP)
IDEA: Implement a mod so that no public email addresses can be viewed unless a member is logged in. The idea is to prevent spam-bots from harvesting email addresses from your forum.
DETAILS: I would like to see a mod that is selectable in the control panel that would do the following: If selected, no email address would be viewable unless a member was logged in. At present, Threads has a setting in the control panel that will limit viewing the user list unless a person is a member is logged in. That's fine, but why not take it to the next step. With this mod, if a check box is selected, then no email addresses on the forum would be viewable to anyone (including bots) unless a member is logged in. For example, right now, anyone can click a members name in a message and view their profile, including their email address if they have one. With this mod, they could still view the profile, but in place of the email address would see something like this: [email hidden unless logged in]
The same would apply to any post that a member views in which a person has included an email address using the [ email ] UBB tags.
I think this type of mod would be a big help in preventing spammers from grabbing forum members' email addresses. Would like to know what you guys think? Is this doable (or has it been done and I just can't find it?)
Basil
|
|
|
|
Joined: May 2001
Posts: 550
Code Monkey
|
Code Monkey
Joined: May 2001
Posts: 550 |
Very fast fix: in showprofile.php
Search for:
// ------------------------------------------------ // If this is a coppa user, we can't show some info
add before:
if(!$Username && $Fakeemail){ $Fakeemail="[hidden for Guests]"; }
|
|
|
|
Joined: May 2001
Posts: 550
Code Monkey
|
Code Monkey
Joined: May 2001
Posts: 550 |
>The same would apply to any post that a member views in which a person has >included an email address using the [ email ] UBB tags. This is also easy. In showflat.php and showthreaded.php Search for: // ------------------------------------------------------------------ // If we came from the search engine then we bold the search keywords Insert before: if(!$Username || $Username == ""){<br /> $Body = preg_replace("/<a href=(\"|")mailto:(.*?)(\"|")>(.*?)<\/a>/i","[email not visible for Guests]",$Body);<br /><br />}
|
|
|
|
Joined: Aug 2002
Posts: 1,191
Kahuna
|
Kahuna
Joined: Aug 2002
Posts: 1,191 |
You can also make a small modification on the showprofile.php to scramble the emails of users that are registered so that the email spiders are being fed with junk (a good way to pay them back). This alteration assumes that you have the IIP installed.
require_once("./pals/spiderfood.php");
if ($thisuser['U_Number'] < 2) { $Fakeemail = screwy_Mail($Fakeemail); $ICQ = screwy_Mail($ICQ); $Extra2 = screwy_Mail($Extra2); $Extra3 = screwy_Mail($Extra3); $Extra4 = screwy_Mail($Extra4); $Extra5 = screwy_Mail($Extra5); }
Nikos
|
|
|
|
Joined: Aug 2002
Posts: 1,191
Kahuna
|
Kahuna
Joined: Aug 2002
Posts: 1,191 |
and to add: the include should be at the top of the script while the next part should be after this block of code:
// ------------------------------------------------ // If this is a coppa user, we can't show some info if ($coppauser) { $Fakeemail = ""; $Name = ""; $Homepage = ""; $Occupation = ""; $Hobbies = ""; $Location = ""; $Bio = ""; $ICQ = ""; $Extra2 = ""; $Extra3 = ""; $Extra4 = ""; $Extra5 = ""; $Picture = ""; }
Nikos
|
|
|
|
Joined: Oct 2001
Posts: 139
Journeyman
|
Journeyman
Joined: Oct 2001
Posts: 139 |
[] Anno said:>The same would apply to any post that a member views in which a person has >included an email address using the [ email ] UBB tags. This is also easy. In showflat.php and showthreaded.php Search for: // ------------------------------------------------------------------ // If we came from the search engine then we bold the search keywords Insert before: if(!$Username || $Username == ""){<br /> $Body = preg_replace("/<a href=(\"|")mailto:(.*?)(\"|")>(.*?)<\/a>/i","[email not visible for Guests]",$Body);<br /><br />} [/] Thanks very much!! Your suggestion for the showprofile.php works great! However, I included your suggested code before the location you state in the showflat and showthreaded files and it has no effect.. When I am not logged in, I can still view the email addresses members have placed in posts. Is there perhaphs a typo in the code? (I'm not getting any errors, but its not doing anything either). Thanks, Basil
|
|
|
|
Joined: May 2001
Posts: 550
Code Monkey
|
Code Monkey
Joined: May 2001
Posts: 550 |
Ah, yes....
One has to use $user['U_Username'] instead of $Username...
if(!$user['U_Username']){ $Body = preg_replace("/<a href=("|")mailto:(.*?)("|")>(.*?)<\/a>/i","[email not visible for Guests]",$Body); }
|
|
|
|
Joined: Oct 2001
Posts: 139
Journeyman
|
Journeyman
Joined: Oct 2001
Posts: 139 |
[]Anno said: Ah, yes....
One has to use $user['U_Username'] instead of $Username...
if(!$user['U_Username']){ $Body = preg_replace("/<a href=("|")mailto:(.*?)("|")>(.*?)<\/a>/i","[email not visible for Guests]",$Body); } [/]
Indeed! That did the trick, but I added also:
if(!$user['U_Username'] || $user['U_Username']==""}
Thanks!
Basil
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 417
Joined: November 2001
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|