hi, en mi foro los usarios no registratos a menudo no usan mails validos sino cosas como
mi@mail.es y esto....
por eso a partir de hoy permiso mis "guests" escribir mensajes sin email (todavia tengo la ip si algo pasa..)
aqui el "mod"
<files>Sources/Post.php</files>
<search>
# If poster is a Guest then evaluate the legality of name and email
if ($username == 'Guest') {
$name = trim($name);
if ($name == '' || $name == '_' || $name == ' ')
fatal_error($txt[75]);
if (strlen($name) > 25)
fatal_error($txt[568]);
if ($email == '')
fatal_error($txt[76]);
if (!preg_match("/^[0-9A-Za-z@\._\-]+$/",$email))
fatal_error($txt[243]);
}
</search>
<replace>
# If poster is a Guest then evaluate the legality of name and email
if ($username == 'Guest') {
$name = trim($name);
if ($name == '' || $name == '_' || $name == ' ')
fatal_error($txt[75]);
if (strlen($name) > 25)
fatal_error($txt[568]);
if ($email == ''){}
else {
if (!preg_match("/^[0-9A-Za-z@\._\-]+$/",$email))
fatal_error($txt[243]);
}
}
</replace>
<files>Sources/Display.php</files>
<search>
if($muserID == '-1') {
print " <BR><a href=\"mailto:$memail\">$img[email_sm]</a>\n";
}else if ($userprofile[$mname]['hideEmail'] != "1" || $settings[7] == "Administrator" || $allow_hide_email != '1') {
print " $profbutton".$userprofile[$mname]['websiteUrl']." <a href=\"mailto:$memail\">$img[email_sm]</a>$sendm\n";
} else {
print" $profbutton{$userprofile[$mname]['websiteUrl']}$sendm \n";
}
</search>
<replace>
if($muserID == '-1' && $memail !='') {
print " <BR><a href=\"mailto:$memail\">$img[email_sm]</a>\n";
}else if ($muserID == '-1' && $memail =='') {
}else if ($userprofile[$mname]['hideEmail'] != "1" || $settings[7] == "Administrator" || $allow_hide_email != '1') {
print " $profbutton".$userprofile[$mname]['websiteUrl']." <a href=\"mailto:$memail\">$img[email_sm]</a>$sendm\n";
} else {
print" $profbutton{$userprofile[$mname]['websiteUrl']}$sendm \n";
}
</replace>
eso es todo!
medi