1
Mods & Plugins (Requests & Discussions) / Problem Adding Extra Fields
« on: October 13, 2005, 05:45:50 AM »
Hi,
I have been trying to add additional fields to the user profile; I have managed to get the fields to show up in the control panel, but the information I type into them will not save. (For example, I am trying to insert a field where a user can type a small bio about themselves. I enter the text, click Save in my control panel, but the info does not show up.) There are so many things that might need adjusting, and I need help.
I HAVE... added the directory to my database:
I HAVE... modified my /includes/db_field_definitions.php to include this field:
I HAVE... modified my /templates/custom/member_edit.html file:
I HAVE... edited my /templates/custom/register_form.html file:
I HAVE... edited my /lang/english/main.php file:
I HAVE... edited my /templates/custom/member_profile.html file:
It's very confusing, editing all of these files. I do not know what is going wrong, so I do not know what I need to fix. Please help. Does anyone know what I might be doing wrong? I will answer all questions asked (maybe not immediately) but I will.
Thanks so much
I have been trying to add additional fields to the user profile; I have managed to get the fields to show up in the control panel, but the information I type into them will not save. (For example, I am trying to insert a field where a user can type a small bio about themselves. I enter the text, click Save in my control panel, but the info does not show up.) There are so many things that might need adjusting, and I need help.
I HAVE... added the directory to my database:
Code: [Select]
4images_users -> user_bio tinyint(1) notnull default 0
I HAVE... modified my /includes/db_field_definitions.php to include this field:
Code: [Select]
if (!defined('ROOT_PATH')) {
die("Security violation");
$additional_user_fields['user_bio'] = array($lang['user_bio'], "text", 0);
I have made sure that there are no spaces after ?>
I HAVE... modified my /templates/custom/member_edit.html file:
Code: [Select]
<tr>
<td class="row2"><b>{lang_bio}</b></td>
<td class="row2"><input type="text" name="user_bio" size="30" value="{user_bio}" class="input" /></td>
</tr>
I HAVE... edited my /templates/custom/register_form.html file:
Code: [Select]
<tr>
<td class="row1"><b>{lang_user_bio}</b></td>
<td class="row1"><input type="text" name="user_bio" size="30" class="input" value="{user_bio}" /></td>
</tr>
I HAVE... edited my /lang/english/main.php file:
Code: [Select]
//--- Users ------------------------------------------- (...) $lang['bio'] = "Bio:";
I HAVE... edited my /templates/custom/member_profile.html file:
Code: [Select]
<tr>
<td class="row2"><b>{user_bio}</b></td>
<td class="row2">{user_bio} </td>
</tr>
It's very confusing, editing all of these files. I do not know what is going wrong, so I do not know what I need to fix. Please help. Does anyone know what I might be doing wrong? I will answer all questions asked (maybe not immediately) but I will.
Thanks so much