Author Topic: Displaying data in details.html  (Read 3425 times)

0 Members and 1 Guest are viewing this topic.

Offline steveeyes

  • Full Member
  • ***
  • Posts: 177
    • View Profile
Displaying data in details.html
« on: March 01, 2007, 02:27:31 PM »
I created a new field for the user when they register as follows:


Step 1. In db_field_definitions.php I added:

$additional_user_fields['user_job'] = array($lang['user_job'], "text", 0);



Step 2. In main.php I added:

$lang['user_job'] = "Your Work:";



Step 3. In register_form.html  and member_editprofile.html  I added:

 <tr>
    <td class="row2"><b>{lang_user_job} (optional) </b></td
     <td class="row2"><input type="text" name="user_job" size="30" value="{user_job}" class="input" /></td>
 </tr>



Step 4. In member_profile.html I added:

<tr>
   <td class="row2"><b>{lang_user_job}</b></td>
   <td class="row2">{user_job}</td>
 </tr>



Step 5. I updated the datbase and added to the 4images_users table: user_job - varchar(255)



Ok. the above 5 steps worked fine. I added some data and it displayed in member_profile.html...


The last step is where I had a problem.


Step 6:  I also added to details.html



<tr>
 <td valign="top" class="row1"><b>{lang_user_job}</b></td>
 <td valign="top" class="row1"><span class="row2">{user_job}</span></td>
 </tr>

However, the information does not show in details.html. Why? How do I get the same data from member_profile.html to show in details.html?


Thanks
Steve

Offline krovacek

  • Pre-Newbie
  • Posts: 2
    • View Profile
Re: Displaying data in details.html
« Reply #1 on: March 06, 2007, 07:07:51 PM »
You can please answer? I need add new field, but I cannot find actual information. Thanks.

Offline KurtW

  • 4images Guru
  • *******
  • Posts: 2.778
    • View Profile
    • Malediven-Bilder ~~Dreams~~
Re: Displaying data in details.html
« Reply #2 on: March 06, 2007, 07:25:48 PM »
Hi,

you can test this in page_header.php:

open includes/page_header.php

search
Code: [Select]
  "site_email" => $config['site_email'],after add
Code: [Select]
  "user_job" => $config['user_job'],
search:
Code: [Select]
  "lang_user_name" => $lang['user_name'],after add
Code: [Select]
  "lang_user_job" => $lang['user_job'],

cu
Kurt


Offline krovacek

  • Pre-Newbie
  • Posts: 2
    • View Profile
Re: Displaying data in details.html
« Reply #3 on: March 07, 2007, 08:00:48 PM »
Always the new information does not show in details. I added field "Your Work", but it in details not show. New field in registration and control panel is ok.