Author Topic: Modifying Registration & Profile Page  (Read 8071 times)

0 Members and 1 Guest are viewing this topic.

Offline Fastian

  • Full Member
  • ***
  • Posts: 199
    • View Profile
Modifying Registration & Profile Page
« on: January 31, 2006, 09:59:39 PM »
Hi
These days I am customizing my registration page. I just want to add something and I need help how to do this.

I want to have this

Password
Confirm Password
E-Mail
Confirm-Email

Basically, I want users to enter password and e-mail twice to confirm it.

One Big Problem here  :(

For some reason, I can’t use  {lang_user_realname} and other language tags in my html files (of my additional fileds). Other than that I m getting these additional fields working well.

Currently, I have added manually the title of these fields in my register_form.html, member_profile.html, member_editprofile.html so at least users can see them. But when I go to admin panel to edit/add a new user I see them blank.

So can someone give me any hint? What possible mistake it could be?

I have followed these instructions
To add new user text fields to the database so that you know more details about who is registering please follow these instructions.

----------------------------------
Step 1
Open: includes/db_field_definitions.php
----------------------------------
$additional_user_fields['user_adress'] = array($lang['user_adress'], "text", 1);
----------------------------------
Step 2
Open: lang/english/main.php
----------------------------------
$lang['user_adress'] = "Address:";
----------------------------------
Step 3
Open: templates/default/register_form.html
----------------------------------

          <tr>
            <td class="row2"><b>{lang_user_adress}</b></td>
            <td class="row2"><input type="text" name="user_adress" size="30" value="{user_adress}" class="input" /></td>
          </tr>   

----------------------------------

Step 4
Open: templates/default/member_edit_profile.html

----------------------------------
 Add:

          <tr>
            <td class="row2"><b>{lang_user_adress}</b></td>
            <td class="row2"><input type="text" name="user_adress"  size="30" value="{user_adress}" class="input" /></td>
          </tr>   
----------------------------------
Step 5
Add database fields via 'PHPMyAdmin' tool and add these fileds under 4images_user table
----------------------------------

And i also follwed

u'll need register {user_realname} in "main" .php files.
Just search for:
Code: [Select]
$site_template->register_vars(array(then u'll see bunch of
Code: [Select]
"something" => $whatever,
"sometingelse" => $somethingelse,
just add this line there:
Code: [Select]
"user_realname" => $lang['user_realname'],make sure, that if u entered as last line in the array, there is no comma at the end of your line, and line above yours must have comma.

M i missing something ?
I m not a  Programmer.
          But
I m a Good Learner.

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
Re: Modifying Registration & Profile Page
« Reply #1 on: February 01, 2006, 02:14:47 AM »
This is wierd...but did you try to add same code from main.php into admin.php language file?
Its just a guess, because it should not happend in the first place...
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 Fastian

  • Full Member
  • ***
  • Posts: 199
    • View Profile
Re: Modifying Registration & Profile Page
« Reply #2 on: February 01, 2006, 03:47:45 PM »
This is wierd...but did you try to add same code from main.php into admin.php language file?
Its just a guess, because it should not happend in the first place...

If you mean copying these additional language tags from main.php to admin.php then I just tried it. It doesn’t make any difference.

Yes it is weird. I installed two mods that involve additional user fields. "User country & gender" & then "User date of birth"
I got some problem with country filed in the first one but that doesn’t involve this strange behavior of "lang" tag.

Now see i have this in my main.php
Code: [Select]
$lang['user_country'] = "Country:";
$lang['user_gender'] = "Gender:";

And i am getting them in register_form.html, member_profile.html, member_editprofile.html .
Now I added these
Code: [Select]
$lang['user_realname'] = "Real Name:";
$lang['user_msn'] = "MSN ID:";
$lang['user_yahoo'] = "Yahoo ID:";
$lang['user_referr'] = "Referrer:";
$lang['user_city'] = "Your City:";

But i m not getting them in html files.  :?

Believe me, before posting this i checkd everything. I cant understand why this is happening.
I m not a  Programmer.
          But
I m a Good Learner.

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: Modifying Registration & Profile Page
« Reply #3 on: February 01, 2006, 04:13:49 PM »
Quote

But i m not getting them in html files.


By still following the discussion, may I ask on which HTML files you added the lang tags ? ;)

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
Re: Modifying Registration & Profile Page
« Reply #4 on: February 02, 2006, 01:20:35 AM »
Yes it is weird. I installed two mods that involve additional user fields. "User country & gender" & then "User date of birth"
I got some problem with country filed in the first one but that doesn’t involve this strange behavior of "lang" tag.
Then its most likely that you've made a misstake during installation "Dropdown for custom fields" mod...
Tripple check Step 3 and 4.x
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 Fastian

  • Full Member
  • ***
  • Posts: 199
    • View Profile
Re: Modifying Registration & Profile Page
« Reply #5 on: February 05, 2006, 09:59:55 AM »
Then its most likely that you've made a misstake during installation "Dropdown for custom fields" mod...
Tripple check Step 3 and 4.x

I have checked it once again. I am sure I haven’t missed anything from that mod.
In my additional user fields I am not using any dropdown option then why/how that could cause any trouble with these??

My best guess could be that I am using birthday mod from this link http://www.4homepages.de/forum/index.php?topic=11361.0 (that’s the last mod I used)
This mod have a drop down option but its not related to "Dropdown for custom fields"

So is that possible that this age mod somehow causing some conflict that is responsible not to show $lang['user_msn'] in html files?
I m not a  Programmer.
          But
I m a Good Learner.

Offline Fastian

  • Full Member
  • ***
  • Posts: 199
    • View Profile
Re: Modifying Registration & Profile Page
« Reply #6 on: February 06, 2006, 07:55:22 PM »
V@no,

Any help? What should I do?? Leave it as it is or should I dig into the problem?

Although its not working right, but at the moment the only trouble I am having is that in my ACP when I try to edit/add a user I cant see these language tags.

I did include it in profile.html & register.html files by manually writing it. So atleast its working there for the moment.
I m not a  Programmer.
          But
I m a Good Learner.

Offline IcEcReaM

  • Hero Member
  • *****
  • Posts: 714
    • View Profile
    • My little Testboard
Re: Modifying Registration & Profile Page
« Reply #7 on: February 06, 2006, 10:07:42 PM »
Can you post your register_form.html and member_profile.html.
Coding is a everlasting competition between programmers who tries to write larger, better and idiot-safe programs and the universe producing larger and stupider idiots...
...so far the universe won
bump

Offline Fastian

  • Full Member
  • ***
  • Posts: 199
    • View Profile
Re: Modifying Registration & Profile Page
« Reply #8 on: February 07, 2006, 12:00:46 PM »
Can you post your register_form.html and member_profile.html.

I am Attaching all three files. If they can be of any use.

I m not a  Programmer.
          But
I m a Good Learner.

Offline Fastian

  • Full Member
  • ***
  • Posts: 199
    • View Profile
Re: Modifying Registration & Profile Page
« Reply #9 on: March 07, 2006, 02:19:27 PM »
The issue with language tags is solved. THANKS to IcEcReaM for help.
This was due to a stupid mistake of mine.

No their is just a small thing,
In registration page, I want to show

E-mail:
Confirm E-Mail:
Password:
Confirm Password:

Confirm e-mail is important coz it happens with lot of user that they don’t provide the correct e-mail.

Secondly, I don’t want the users to change the email after their registration. I mean,  disable them to edit their e-mail in Edit Profile. I tried removing e-mail filed from member_editprofile.html but that don’t work properly.
I m not a  Programmer.
          But
I m a Good Learner.