1. When registering or submitting a link the submitted email address should be checked. I have a lot of people submitting some cryptic sh* in that field. So if the script makes ure that the field at least contains a '@' it would really help. Maybe it's even possible to prevent certain domains, just like when submitting links ?!? (BTW, is there a chance that this is not working when editing links afterwards?)
2. On the search/edit in the drop downs containg 'is exactly, contains', etc. is it possible to add a 'does not contain' option?
There are two types of searching on that page, one using edit.php and the other using search.php. For the former open /admin/adminfunctions.php and replace every instance of
if ($condition == 'like') $condition = "$field LIKE '%$fieldvalue%'";
with
if ($condition == 'like') $condition = "$field LIKE '%$fieldvalue%'"; else if ($condition == 'not like') $condition = "$field NOT LIKE '%$fieldvalue%'";
For search.php I think you need to relace
else if ($condition == 'like')
{
$generatesearch .= "$searchfields[$count] ";
if ($condition == 'like') $generatesearch .= "LIKE '%$search%'";
else $generatesearch .= "$condition '$search'";
if ($count < ($num-1)) { if ($action == 'filter') $generatesearch .= " AND "; else $generatesearch .= " OR "; }
}
with
else if ($condition == 'like')
{
$generatesearch .= "$searchfields[$count] ";
if ($condition == 'like') $generatesearch .= "LIKE '%$search%'";
else $generatesearch .= "$condition '$search'";
if ($count < ($num-1)) { if ($action == 'filter') $generatesearch .= " AND "; else $generatesearch .= " OR "; }
} else if ($condition == 'not like') { $generatesearch .= "$searchfields[$count] "; if ($condition == 'not like') $generatesearch .= "NOT LIKE '%$search%'"; else $generatesearch .= "$condition '$search'"; if ($count < ($num-1)) { if ($action == 'filter') $generatesearch .= " AND "; else $generatesearch .= " OR "; } }
Then, in both cases, just place a condition option with the value "not like" in the template where you want it.
On a similar note, is it possible to make it so that proper email syntax is checked when a new member is signing up (not sure if this would be the same as a person submitting a link)? I get a lot of people signing up with incomplete email addresses (example: george@, x234@hotmail, davidb, etc). Also, email is already selected as a required field on the Functionality page.
$templatesdir = $settings->templatesdir; // correct problem of wrong template set being used
$correctsecurityimage = securityimagevalue();
->
if ($_POST['email'] != '' && !strstr($email, '@')) { $incomplete = true; $incompletelang = $language->suggest_invalidemail; } $templatesdir = $settings->templatesdir; // correct problem of wrong template set being used
I implemented this code, but had someone sign up today with an email address missing the .com (name@hotmail). Is there a way to check for at least one "." after the "@"?
Comments on Feature Suggestion: eMail check
Forum Regular
Usergroup: Customer
Joined: May 11, 2003
Total Topics: 64
Total Comments: 199
1.
When registering or submitting a link the submitted email address should be checked. I have a lot of people submitting some cryptic sh* in that field. So if the script makes ure that the field at least contains a '@' it would really help. Maybe it's even possible to prevent certain domains, just like when submitting links ?!?
(BTW, is there a chance that this is not working when editing links afterwards?)
2.
On the search/edit in the drop downs containg 'is exactly, contains', etc. is it possible to add a 'does not contain' option?
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
I don't believe editing is designed to exclude domains.
#1: Already done if email is a required field, to apply when it isn't: In suggest.php replace with
#2 I'll have to check later.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
There are two types of searching on that page, one using edit.php and the other using search.php. For the former open /admin/adminfunctions.php and replace every instance of
with
For search.php I think you need to relace
with
Then, in both cases, just place a condition option with the value "not like" in the template where you want it.
Forum Regular
Usergroup: Customer
Joined: Jun 02, 2004
Total Topics: 32
Total Comments: 142
On a similar note, is it possible to make it so that proper email syntax is checked when a new member is signing up (not sure if this would be the same as a person submitting a link)? I get a lot of people signing up with incomplete email addresses (example: george@, x234@hotmail, davidb, etc). Also, email is already selected as a required field on the Functionality page.
Thanks,
Adam
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Register.php
->
Forum Regular
Usergroup: Customer
Joined: Jun 02, 2004
Total Topics: 32
Total Comments: 142
I implemented this code, but had someone sign up today with an email address missing the .com (name@hotmail). Is there a way to check for at least one "." after the "@"?
Adam
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Change
if ($_POST['email'] != '' && !strstr($email, '@'))
to
if ($_POST['email'] != '' && (!strstr($email, '@') || !strstr($email, '.')))