Location Field
-
- i need to paint my car!
- Posts: 374
- Joined: Fri Jan 09, 2004 9:42 pm
- Location: Ballarat
Location Field
Is it possible to make it mandatory that the Location field be filled in when registering a new profile?? makes it easier when people have things for sale and also just makes it easier to know where different people are from.
If you lend someone $20 and never see them again, it was probably well spent.
You will need to edit includes/usercp_register.php
Find the line that says :
see the line that says
?
This is the line that checks the mandatory fields are filled. You want to make location mandatory, so add in || empty($location) before the last bracket, and the line will look like this:
And that will work, and reject people who do not specify a location. But it won't show location with a * beside it - if I work that out I will let you know.
Deeks - BE VERY CAREFUL CHANGING THIS. DON'T BREAK THE FORUM :D
Find the line that says :
Code: Select all
else if ( $mode == 'register' )
{
if ( empty($username) || empty($new_password) || empty($password_confirm) || empty($email))
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Fields_empty'];
}
}
Code: Select all
if ( empty($username) || empty($new_password) || empty($password_confirm) || empty($email))
This is the line that checks the mandatory fields are filled. You want to make location mandatory, so add in || empty($location) before the last bracket, and the line will look like this:
Code: Select all
if ( empty($username) || empty($new_password) || empty($password_confirm) || empty($email) || empty($location))
Deeks - BE VERY CAREFUL CHANGING THIS. DON'T BREAK THE FORUM :D
..and to make a * appear beside Location, edit Templates\subSilver\profile_add_body.tpl
find this line:
and change it to
(all we did there was add a star after it)
find this line:
Code: Select all
<td class="row1"><span class="gen">{L_LOCATION}:</span></td>
Code: Select all
<td class="row1"><span class="gen">{L_LOCATION}: *</span></td>
hehe, ok ok ok, reelaaaaaaaaaax matty... dun fark nothing up now...
so this will work with new members signing up, and to get everyone here to add their location, i'll just delete every user who hasn't entered one!
so this will work with new members signing up, and to get everyone here to add their location, i'll just delete every user who hasn't entered one!
_
_________________
_________________
Who is online
Users browsing this forum: No registered users and 3 guests