Author Topic: Image owner details below image on details.html  (Read 4258 times)

0 Members and 1 Guest are viewing this topic.

Offline nfprehn

  • Newbie
  • *
  • Posts: 41
    • View Profile
    • How to become a model
Image owner details below image on details.html
« on: July 31, 2006, 05:07:45 PM »
Hello all

I would like to display the user details of the image owner below every image in details.html.

I have searched this board long and hard, but cannot find what I am looking for, and I have so far not managed to get it to work by myself.

V@no has been very helpful in solving a similar request of mine: http://www.4homepages.de/forum/index.php?topic=12914.0  - but I have so far not been able to figure this out...


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: Image owner details below image on details.html
« Reply #1 on: July 31, 2006, 08:38:45 PM »
Here is a the simpliest way I think:
in details.php find:
Code: [Select]
$in_mode = 0;Insert above:
Code: [Select]
if ($user_row = get_user_info($image_row['user_id']))
{
  foreach ($user_row as $key => $val)
  {
    $user_row['image_'.$key] = $val;
    unset($user_row[$key]);
  }
  $user_row['image_user_exits'] = 1;
}
else
{
  $user_row['image_user_name'] = $lang['userlevel_guest'];
  $user_row['image_user_exits'] = "";
}
$site_template->register_vars($user_row);

After that you can use fields name from 4images_users table as template tags with image_ prefix.
i.e. {image_user_name} or {image_user_email}
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 max79

  • Pre-Newbie
  • Posts: 2
    • View Profile
Re: Image owner details below image on details.html
« Reply #3 on: November 16, 2006, 04:34:47 PM »
would like to display the user details of the image owner below every image in thumbnail_bit.html like in the details.html

where in the categories.php i have to add the code?

thx