UseBB Community

The official board for UseBB help and discussion

UseBB Community » Help & Support » how can i enable the full page description during registration

how can i enable the full page description during registration

Moderators: Gaia.

Page: 1

Author Post
Member
Registered: Jan 2006
Posts: 6
how can i enable the full page description during registration?? i want that whenever any user register with our site he has to fill complete form.
how do i enable that???
or how can i design that??
thanx and regards
Ans
Developer
Registered: Apr 2004
Posts: 2218
Location: Belgium
What do you mean exactly?

The registration form only has four fields, and that can't be changed.
_______________
--Dietrich (developer)
UseBB roadmap, dev mailing list & weblog
Member
Registered: Jan 2006
Posts: 6
i want to ask the user more information during registration???
like his real name and date of birth and his designation which is given in the profile.
is it posssible to ask the the new user to fill complete form during the registrtation.

i think u get now
thanks
ANS
Developer
Registered: Apr 2004
Posts: 2218
Location: Belgium
This is not possible...
_______________
--Dietrich (developer)
UseBB roadmap, dev mailing list & weblog
Moderator
Registered: Oct 2005
Posts: 449
Location: canada
I will write up a quick modification this weekend on how to add some other fields to the registration form.
Member
Registered: Mar 2005
Posts: 196
Location: Hungary
Gaia wrote
I will write up a quick modification this weekend on how to add some other fields to the registration form.


'Required fields' in ACP?
_______________
Long Live Rock n' Roll!
Moderator
Registered: Oct 2005
Posts: 449
Location: canada
I'm probably just going to add the fields to the registration form.
Member
Registered: Jan 2006
Posts: 6
thanx to u all pls do it asap
Moderator
Registered: Oct 2005
Posts: 449
Location: canada
hey,

Well i tried, and got the location and real name added easily enough, but the birthday is showing to be a challenge and I can't seem to get it working. The function variables are always seeming to turn up undefined.

So, if you only want location and real name then I can tell you how to add those, but birthday will have to be added by someone more PHP wise.
Member
Registered: Jan 2006
Posts: 6
ya please tell me how to add the name and location. and if possible i will try myself to add bday
thanx
ANS
Member
Registered: Apr 2004
Posts: 192
Location: Brussels Belgium
Gaia wrote
Well i tried, and got the location and real name added easily enough, but the birthday is showing to be a challenge and I can't seem to get it working. The function variables are always seeming to turn up undefined.


for the birthday part check file panel_profile.php lines 158 and 159 :) That should help you (I think).
_______________
Moderator
Registered: Oct 2005
Posts: 449
Location: canada
Yea i did check, and used the code that was used there and the function from functions.php but the variables kept coming up undefined so i kept getting the useBB error.

ansishere wrote
ya please tell me how to add the name and location. and if possible i will try myself to add bday
thanx
ANS


Ok i will post it up in a few.
Member
Registered: Apr 2004
Posts: 192
Location: Brussels Belgium
Gaia wrote
Yea i did check, and used the code that was used there and the function from functions.php but the variables kept coming up undefined so i kept getting the useBB error.
:? hmm, post the code for the birthday part too please
_______________
Member
Registered: Jan 2006
Posts: 6
hi Gaia,
Please post the update of registeration of form . i need it immeditely.
thanks and regards
ANS
Moderator
Registered: Oct 2005
Posts: 449
Location: canada
Sorry, got into a new game i downloaded and completely forgot about this :p. Samual, i deleted the birthday edits i made but i will post them here when i try again later this week.

Ok, so the edits. I was guessing you wanted each field required..

----- /sources/panel_register.php -----

Find: (around line 127)
	//
// If all necessary information has been posted and the user accepted the terms
//
if ( !empty($_POST['user']) && !$username_taken && !$username_banned && !empty($_POST['email']) && !$email_banned && !empty($_POST['passwd1']) && !empty($_POST['passwd2']) && preg_match(USER_PREG, $_POST['user']) && preg_match(EMAIL_PREG, $_POST['email']) && strlen($_POST['passwd1']) >= $functions->get_config('passwd_min_length') && preg_match(PWD_PREG, $_POST['passwd1']) && $_POST['passwd1'] == $_POST['passwd2'] && !empty($_POST['acceptedterms']) && !empty($_POST['saltcode']) && $_SESSION['saltcode'] == $_POST['saltcode'] ) {


Replace with:

//
// If all necessary information has been posted and the user accepted the terms
//
if ( !empty($_POST['user']) && !$username_taken && !$username_banned && !empty($_POST['email']) && !$email_banned && !empty($_POST['real_name']) && !empty($_POST['location']) && !empty($_POST['passwd1']) && !empty($_POST['passwd2']) && preg_match(USER_PREG, $_POST['user']) && preg_match(EMAIL_PREG, $_POST['email']) && strlen($_POST['passwd1']) >= $functions->get_config('passwd_min_length') && preg_match(PWD_PREG, $_POST['passwd1']) && $_POST['passwd1'] == $_POST['passwd2'] && !empty($_POST['acceptedterms']) && !empty($_POST['saltcode']) && $_SESSION['saltcode'] == $_POST['saltcode'] ) {


Find: (around line 146)

//
// Create a new row in the user table
//
$result = $db->query("INSERT INTO ".TABLE_PREFIX."members ( id, name, email, passwd, regdate, level, active, active_key, template, language, date_format, enable_quickreply, return_to_topic_after_posting, target_blank, hide_avatars, hide_userinfo, hide_signatures, displayed_name, real_name, location ) VALUES ( NULL, '".$_POST['user']."', '".$_POST['email']."', '".md5($_POST['passwd1'])."', ".time().", ".$level.", ".$active.", '".md5($active_key)."', '".$functions->get_config('template')."', '".$functions->get_config('language')."', '".$functions->get_config('date_format')."', ".$functions->get_config('enable_quickreply').", ".$functions->get_config('return_to_topic_after_posting').", ".$functions->get_config('target_blank').", ".$functions->get_config('hide_avatars').", ".$functions->get_config('hide_userinfo').", ".$functions->get_config('hide_signatures').", '".$_POST['user']."' )");


Replace with:

//
// Create a new row in the user table
//
$result = $db->query("INSERT INTO ".TABLE_PREFIX."members ( id, name, email, passwd, regdate, level, active, active_key, template, language, date_format, enable_quickreply, return_to_topic_after_posting, target_blank, hide_avatars, hide_userinfo, hide_signatures, displayed_name, real_name, location ) VALUES ( NULL, '".$_POST['user']."', '".$_POST['email']."', '".md5($_POST['passwd1'])."', ".time().", ".$level.", ".$active.", '".md5($active_key)."', '".$functions->get_config('template')."', '".$functions->get_config('language')."', '".$functions->get_config('date_format')."', ".$functions->get_config('enable_quickreply').", ".$functions->get_config('return_to_topic_after_posting').", ".$functions->get_config('target_blank').", ".$functions->get_config('hide_avatars').", ".$functions->get_config('hide_userinfo').", ".$functions->get_config('hide_signatures').", '".$_POST['user']."', '".unhtml(stripslashes($_POST['real_name']))."','".unhtml(stripslashes($_POST['location']))."' )");


Find: (around line 227)

$errors[] = $lang['Email'];


After add:

if ( empty($_POST['real_name']) )
$errors[] = $lang['RealName'];

if ( empty($_POST['location']) )
$errors[] = $lang['Location'];


Find: (around line 275)

'passwd2_input' => '<input type="password" name="passwd2" size="25" maxlength="255" />',


After add:

'real_name_input' => '<input type="text" name="real_name" size="25" maxlength="255" />',
'location_input' => '<input type="text" name="location" size="25"maxlength="255" />',


------ /templates/default/various.tpl.php -----

Find:

<tr>
<td class="fieldtitle">{l_PasswordAgain}</td><td>{passwd2_input}</td>
</tr>


After Add:

<tr>
<th colspan="2">Other Information</th>
</tr>
<tr>
<td class="fieldtitle">{l_RealName}</td><td>{real_name_input}</td>
<tr>
<tr>
<td class="fieldtitle">{l_Location}</td><td>{location_input}</td>
</tr>
<tr>


Upload the files and it should work.
Member
Registered: Jan 2006
Posts: 6
thanks dear

Page: 1

UseBB Community » Help & Support » how can i enable the full page description during registration

UseBB Community is powered by UseBB 1 Forum Software