4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: halobender 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: 4images_users -> user_bio tinyint(1) notnull default 0
I HAVE... modified my /includes/db_field_definitions.php to include this field: 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: <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: <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: //--- Users ------------------------------------------- (...) $lang['bio'] = "Bio:";
I HAVE... edited my /templates/custom/member_profile.html file: <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
-
1)
user_bio tinyint(1) notnull default 0
is a wrong type of field for this purpose
You either need VARCHAR(255) or TEXT type of the field.
2)
if (!defined('ROOT_PATH')) {
die("Security violation");
$additional_user_fields['user_bio'] = array($lang['user_bio'], "text", 0);
I hope it doesnt look like this in your file, your new entry should be just above closing ?>
-
Thanks very much! That got things working. :D
One other small thing: how do I resize an input field to make it taller (this is for the bio information a user can enter in their control panel, which can contain up to 255 characters) and make it so that the field has an option for a scrollbar (if necessary). Does that need a special TEXTAREA tag/setting in my database?
-
not in the database, but in the template where you have this field (textarea)
-
I've tried that, but it won't save the information I put into the field (I just know for a fact there's something wrong with this code, but I don't know how to fix it). Here is what I am typing in my member_editprofile.html file:
<td class="row2"><b>{lang_user_bio}</b></td>
<td class="row2"><TEXTAREA name="user_bio" cols="23" rows="5" value="{user_bio}" class="input" /></textarea></td>
EDIT: It won't show the bio text after I type it in the field and submit it, but when I click on my profile from the main gallery page, the information is there in my profile. Weird. My setting for this field in my database is VARCHAR(255).
-
you must add {user_bio} between <textarea> and </textarea> not as value="" ;)
<TEXTAREA name="user_bio" cols="23" rows="5" class="input" />{user_bio}</textarea>
-
DB Error: Bad SQL Query: INSERT INTO 4images_users (user_id, user_level, user_name, user_password, user_email, user_showemail, user_allowemails, user_invisible, user_joindate, user_activationkey, user_lastaction, user_lastvisit, user_comments, user_homepage, user_icq, user_limit, user_bio) VALUES (2147483648, 2, '56', '9f61408e3afb633e50cdf1b20de6f466', '56@mail.ru', 1, 1, 0, 1138404708, 'e3e19611643411ef5e21e808afbf55ba', 1138404708, 1138404708, 0, '', '', 5, 'tyhjh')
Duplicate entry '2147483647' for key 1
У меня такая проблема , что это может быть за двойной вход и как его исправить :?: :D Плиз... подскажите...
-
Как вывести {user_bio}{lang_user_bio} на страничке details.html . Если я их просто вставляю туда то они не отображаются. Подскажите пожалуйста что нужно сделать :?:
-
Как вывести {user_bio}{lang_user_bio} на страничке details.html . Если я их просто вставляю туда то они не отображаются. Подскажите пожалуйста что нужно сделать :?:
Ведь в профиле город появляется а почему details.html нет :?:
-
V@no Подскажите как специалист :D
-
:?: :cry:
-
:?: :cry:
-
Неужели мне никто не поможет :?:
-
Duplicate entry '2147483647' for key 1
@Alex_Ok:
The problem is that you already have this entry in your users table and cannot be added twice. If you're trying to make any corrections on that table, make sure to backup it up first, then to empty your table. Then, execute the SQL query from your mysql_default.sql file. ;)
-
Как вывести {user_bio}{lang_user_bio} на страничке details.html . Если я их просто вставляю туда то они не отображаются. Подскажите пожалуйста что нужно сделать
-
ни кто не знает :?:
-
Как вывести {user_bio}{lang_user_bio} на страничке details.html . Если я их просто вставляю туда то они не отображаются. Подскажите пожалуйста что нужно сделать
Неужели никто не подскажет почему не выводятся новые данные из {user_bio}{lang_user_bio} на странице details.html
-
Может я вопрос задаю не правильно :?:
Я хочу вывести данные из доп областей на страничку? но их не видно на страничке details.html. Подскажите плиз... в чём дело :?:
Хотя в member.html всё в порядке и доп области работают
-
Ну кто нибудь подскажите.... Как вывести .... :?: :?: :?:
-
Can anyone explain me this thinks in English please? I want to add extra profile fields... How can i do it? Can anyone explain me like add after this code bla bla???
Thanks a lot