4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: rycat on June 25, 2003, 11:18:28 AM

Title: Add new fields for user Registration
Post by: rycat 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...
Title: Add new fields for user Registration
Post by: Apollo13 on June 25, 2003, 01:45:39 PM
read information in constants.php
Title: Add new fields for user Registration
Post by: V@no on June 25, 2003, 02:07:33 PM
Quote from: Cr@zy Sash
read information in constants.php

/includes/db_field_definitions.php ;)
Title: Add new fields for user Registration
Post by: rycat 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
Title: Add new fields for user Registration
Post by: V@no 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 ;)
Title: Add new fields for user Registration
Post by: rycat 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?
Title: Add new fields for user Registration
Post by: rycat 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!!!
Title: Add new fields for user Registration
Post by: V@no 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
Title: Add new fields for user Registration
Post by: rycat 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.
Title: Add new fields for user Registration
Post by: Jan on June 26, 2003, 03:19:20 PM
Try phpMyAdmin (http://www.phpmyadmin.net). Nice and easy tool to manage MySQL databases.

Jan
Title: Add new fields for user Registration
Post by: rycat 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.
Title: Re: Add new fields for user Registration
Post by: b.o.fan on March 10, 2005, 04:17:03 PM
how con i make this editable in the members control panel????
Title: Re: Add new fields for user Registration
Post by: Chris 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:
Title: Re: Add new fields for user Registration
Post by: b.o.fan 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????
Title: Re: Add new fields for user Registration
Post by: live@ct on March 11, 2005, 01:58:15 AM
and how to show this new field in the start of the page??!?
Title: Re: Add new fields for user Registration
Post by: b.o.fan on March 15, 2005, 07:53:37 PM
no ideas?

look up @ my first question!
Title: Re: Add new fields for user Registration
Post by: V@no on March 16, 2005, 12:58:13 AM
use "radio" in db_field_definitions.php
and read comments and examples inside that file.
Title: Re: Add new fields for user Registration
Post by: b.o.fan on March 17, 2005, 12:05:30 AM
yeah...

 :( :( :(

can anybody wrote a turturial?????