You may use one of the "user_custom" fields defined in $dbUserSheme (setup_options.php) or create and define some special field, for example, "user_custom_fullname" (second is recommended). So, procedure is the following:
1) In your mySQL manager, execute the following command for minibb database:
ALTER TABLE minibbtable_users ADD user_custom_fullname VARCHAR(254) NOT NULL;
where "minibbtable_users" is your users table name.
2) Look at the FIELDS of this database, and calculate manually NUMERICAL INDEX of the new field. For example, your fields look like this, and have these indexes (beginning from top):
user_id - 0 (begin from zero!) username - 1 user_regdate - 2 user_password - 3 user_email - 4 user_icq - 5 user_website - 6 user_occ - 7 user_from - 8 user_interest - 9 user_viewemail - 10 user_sorttopics - 11 user_newpwdkey - 12 user_newpasswd - 13 language - 14 activity - 15 user_custom1 - 16 user_custom2 - 17 user_custom3 - 18 user_custom_fullname - 19
3) Open setup_options.php, find $dbUserSheme and at the very END of this array add new line for "fullname":
... 'language'=>array(14,'language','language'), 'user_custom1'=>array(16,'user_custom1','user_custom1'), 'user_custom2'=>array(17,'user_custom2','user_custom2'), 'user_custom3'=>array(18,'user_custom3','user_custom3'), 'user_custom_fullname'=>array(19,'user_custom_fullname', 'user_custom_fullname') );
(notice: no comma after last element in array before ); )
4) Open your language file (f.e., eng.php), look up for $l_usrInfo and add:
$l_usrInfo[14]='Fullname';
4) Open templates/user_dataform.html and add the new input text code for that field:
<tr> <td class=caption4 align=right valign=top>{$l_usrInfo[14]}</td> <td class=caption5><input type=text name=user_custom_fullname maxlength=100 size=20 value="{$user_custom_fullname}" class=textForm style="width:200px;"> <span class=txtSm>({$l_max} 254 {$l_symbols})</span></td> </tr>
And that check how it works: 1) Register new user with this new field 2) Edit user preferences with this field 3) View user info with this field
Please, use miniBB 2.0 RC2a (not RC2) because we have fixed important issue regarding described method. |