4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started 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...
-
read information in constants.php
-
read information in constants.php
/includes/db_field_definitions.php ;)
-
Ok... Ive added the following to:
db_field_definitions.php
$additional_user_fields['contact_number'] = array($lang['contact_number'], "text", 1);
$additional_user_fields['organisation'] = array($lang['organisation'], "text", 1);
lang/main.php
$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
-
yes, that's it. now all u need is edit your templates and insert <input> stuff as Jan has explained ;)
-
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?
-
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!!!
-
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
-
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.
-
Try phpMyAdmin (http://www.phpmyadmin.net). Nice and easy tool to manage MySQL databases.
Jan
-
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.
-
how con i make this editable in the members control panel????
-
There is nothing you need to do. Additional member fields automatically show up as editable fields in the control panel. :wink:
-
oki thanx
but
where i must edit, that the user can say yes or no to show his name in the profile???
any idas????
-
and how to show this new field in the start of the page??!?
-
no ideas?
look up @ my first question!
-
use "radio" in db_field_definitions.php
and read comments and examples inside that file.
-
yeah...
:( :( :(
can anybody wrote a turturial?????