Location Field

Help in the development of Austarion
Post Reply
StarionBoy
i need to paint my car!
Posts: 374
Joined: Fri Jan 09, 2004 9:42 pm
Location: Ballarat

Location Field

Post by StarionBoy »

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. Image
decoy
Let Me Out!
Posts: 4424
Joined: Tue Sep 09, 2003 3:03 pm
Location: Far from home
Contact:

Post by decoy »

u farken agree!

jrod? cam? anyone know how to code that?
_
_________________
User avatar
jrod82
StarioNZ.com
Posts: 985
Joined: Tue Jan 13, 2004 1:02 pm
Location: Helengrad, Aotearoa

Post by jrod82 »

You will need to edit includes/usercp_register.php

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'];
		}
	}
see the line that says

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))
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
Image
User avatar
jrod82
StarioNZ.com
Posts: 985
Joined: Tue Jan 13, 2004 1:02 pm
Location: Helengrad, Aotearoa

Post by jrod82 »

..and to make a * appear beside Location, edit Templates\subSilver\profile_add_body.tpl

find this line:

Code: Select all

	  <td class="row1"><span class="gen">{L_LOCATION}:</span></td>
and change it to

Code: Select all

	  <td class="row1"><span class="gen">{L_LOCATION}: *</span></td>
(all we did there was add a star after it)
Image
decoy
Let Me Out!
Posts: 4424
Joined: Tue Sep 09, 2003 3:03 pm
Location: Far from home
Contact:

Post by decoy »

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!
_
_________________
User avatar
jrod82
StarioNZ.com
Posts: 985
Joined: Tue Jan 13, 2004 1:02 pm
Location: Helengrad, Aotearoa

Post by jrod82 »

or set their location as something highly offensive to force them to change it :D
Image
Post Reply

Who is online

Users browsing this forum: No registered users and 25 guests