Author Topic: Add new fields for user Registration  (Read 15966 times)

0 Members and 1 Guest are viewing this topic.

Offline rycat

  • Newbie
  • *
  • Posts: 28
    • View Profile
Add new fields for user Registration
« on: June 25, 2003, 11:18:28 AM »
Hello,

I know that this has been discussed a few times already however I couldnt find a post that could help me... I read this topic http://www.4homepages.de/forum/viewtopic.php?p=3277#3277 and still couldnt figure it out.

Basically what I would like to do is add two fields to the User Regisration form, Contact Number and Organisation... I would like these to be required fields and for them to be editable in the User's control panel.

Hope the above makes sense. Also I apologise in advance if this question has been dealt with before and I missed it in the forums... If so please point me to the post...

Thanks again...

Offline Apollo13

  • Addicted member
  • ******
  • Posts: 1.093
    • View Profile
Add new fields for user Registration
« Reply #1 on: June 25, 2003, 01:45:39 PM »
read information in constants.php

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Add new fields for user Registration
« Reply #2 on: June 25, 2003, 02:07:33 PM »
Quote from: Cr@zy Sash
read information in constants.php

/includes/db_field_definitions.php ;)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline rycat

  • Newbie
  • *
  • Posts: 28
    • View Profile
Add new fields for user Registration
« Reply #3 on: June 25, 2003, 02:24:02 PM »
Ok... Ive added the following to:

db_field_definitions.php

Code: [Select]

$additional_user_fields['contact_number'] = array($lang['contact_number'], "text", 1);
$additional_user_fields['organisation'] = array($lang['organisation'], "text", 1);


lang/main.php
Code: [Select]

$lang['contact_number'] = "Contact Number:";
$lang['organisation'] = "Organisation:";


Am I  on the right track? Not really sure where to go from here...please help!!!

Thanks again

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Add new fields for user Registration
« Reply #4 on: June 25, 2003, 02:25:44 PM »
yes, that's it. now all u need is edit your templates and insert <input> stuff as Jan has explained ;)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline rycat

  • Newbie
  • *
  • Posts: 28
    • View Profile
Add new fields for user Registration
« Reply #5 on: June 25, 2003, 02:42:10 PM »
Ok Ive added the input fields in the registration form and it all works fine... except I dont think the information is being added to the database in fact if I look in the database I cant see the two new fields I added to the db_field_definitions.php file.

<--EDIT-->
Do I need to add the database fields manually in mysql?

Offline rycat

  • Newbie
  • *
  • Posts: 28
    • View Profile
Add new fields for user Registration
« Reply #6 on: June 25, 2003, 04:24:38 PM »
Can someone please explain what should happen when I add the two above lines to the db_fields_definition.php file?

Should it then automatically add these fields to the database in the 4images_users table?

Please help Im losing my mind trying to get this working!!!

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Add new fields for user Registration
« Reply #7 on: June 25, 2003, 09:23:16 PM »
Quote from: rycat
Can someone please explain what should happen when I add the two above lines to the db_fields_definition.php file?

Should it then automatically add these fields to the database in the 4images_users table?

Please help Im losing my mind trying to get this working!!!

no, u must FIRST add manualy all needed fields in the database.
4images doesnt "SELECT" all fields by default (SELECT *) but only specific fields, because of that, when u add new fields in the database, 4images would not "SELECT" them and u wont be able use them, that why u need add the information about the new fields in db_field_definitions.php
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline rycat

  • Newbie
  • *
  • Posts: 28
    • View Profile
Add new fields for user Registration
« Reply #8 on: June 26, 2003, 07:48:03 AM »
Quote
no, u must FIRST add manualy all needed fields in the database.
4images doesnt "SELECT" all fields by default (SELECT *) but only specific fields, because of that, when u add new fields in the database, 4images would not "SELECT" them and u wont be able use them, that why u need add the information about the new fields in db_field_definitions.php


Thanks V@no,

You are a massive help... My SQL is a little dodgy any thoughts on the SQL syntax to alter the 4images_user table for the two fields I need?

Thanks again.

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Add new fields for user Registration
« Reply #9 on: June 26, 2003, 03:19:20 PM »
Try phpMyAdmin. Nice and easy tool to manage MySQL databases.

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline rycat

  • Newbie
  • *
  • Posts: 28
    • View Profile
Add new fields for user Registration
« Reply #10 on: June 26, 2003, 03:42:52 PM »
Got it working at last !!!

Thanks V@no for all the help... if you are ever in London look me up and Ill buy you a beer.

b.o.fan

  • Guest
Re: Add new fields for user Registration
« Reply #11 on: March 10, 2005, 04:17:03 PM »
how con i make this editable in the members control panel????

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Re: Add new fields for user Registration
« Reply #12 on: March 10, 2005, 05:33:39 PM »
There is nothing you need to do.  Additional member fields automatically show up as editable fields in the control panel.  :wink:

b.o.fan

  • Guest
Re: Add new fields for user Registration
« Reply #13 on: March 10, 2005, 08:25:05 PM »
oki thanx

but

where i must edit, that the user can say yes or no to show his name in the profile???

any idas????
« Last Edit: March 10, 2005, 09:00:35 PM by b.o.fan »

Offline live@ct

  • Sr. Member
  • ****
  • Posts: 348
    • View Profile
Re: Add new fields for user Registration
« Reply #14 on: March 11, 2005, 01:58:15 AM »
and how to show this new field in the start of the page??!?
Existen 10 tipos de personas, los que entienden el codigo binario y los que no.