Author Topic: Zusätzliche User Infos ausgeben/ Add. User Infos read out...  (Read 3342 times)

0 Members and 1 Guest are viewing this topic.

Offline Jan-Hendrik

  • Newbie
  • *
  • Posts: 12
    • View Profile
Hallo,

ich habe zur förmlichen Anrede ein zusätzliches Feld im 4images_users table angelegt, welches ich user_sex genannt habe. Der Eintrag bei der Registrierung funzt auch so weit, nun möchte ich den Inhalt auslesen.

Ich habe vor, das im Profil Link, bzw. allg. bei den Usernamen nun die Anrede davor setzten.

In der function.php habe ich folgendes editiert:

Code: [Select]

if (isset($image_row[$user_table_fields['user_name']]) && $image_row['user_id'] != GUEST) {
    $user_name = $image_row[$user_table_fields['user_name']];

     $user_sex = $image_row[$user_table_fields['user_sex']];
   
    $user_profile_link = (!empty($url_show_profile)) ? preg_replace("/{user_id}/", $image_row['user_id'], $url_show_profile) : ROOT_PATH."member.php?action=showprofile&".URL_USER_ID."=".$image_row['user_id'];
    $user_name_link = "<a href=\"".$site_sess->url($user_profile_link)."\"> ".$user_sex."  ".$user_name."</a>";
  }


Es erfolgt aber keine Ausgabe.
Weiss jemad einen Rat?

cu
jan-hendrik



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

Hello,

i will try in english... *g*

i added an additional field at 4images_users table, it be called user_sex.
now i like to read out the information for the profil link.

i already edited the function.php like this:

Code: [Select]

if (isset($image_row[$user_table_fields['user_name']]) && $image_row['user_id'] != GUEST) {
    $user_name = $image_row[$user_table_fields['user_name']];

     $user_sex = $image_row[$user_table_fields['user_sex']];
   
    $user_profile_link = (!empty($url_show_profile)) ? preg_replace("/{user_id}/", $image_row['user_id'], $url_show_profile) : ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$image_row['user_id'];
    $user_name_link = "<a href=\"".$site_sess->url($user_profile_link)."\"> ".$user_sex."  ".$user_name."</a>";
  }


now, there are no information read out!
please help.

cu
jan-hendrik

...sorry for my native english...

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: Zusätzliche User Infos ausgeben/ Add. User Infos read out...
« Reply #1 on: December 25, 2005, 09:58:44 PM »
Looks good but

change this line :

Quote

$user_profile_link = (!empty($url_show_profile)) ? preg_replace("/{user_id}/", $image_row['user_id'], $url_show_profile) : ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$image_row['user_id'];


to read as :

Code: [Select]

$user_profile_link = (!empty($url_show_profile)) ? str_replace("{user_id}", $image_row['user_id'], $url_show_profile) : $site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$image_row['user_id']);


Merry Christmas.