F
FoxBit
Гость
Доброго дня.
Если не затруднит, покажите пожалуйста как вывести аватарку автора темы в этой же теме
Если не затруднит, покажите пожалуйста как вывести аватарку автора темы в этой же теме
// Get forum/topic data
if ($topic_id)
{
$sql = "SELECT t.*, f.*
FROM ". BB_TOPICS ." t, ". BB_FORUMS ." f
WHERE t.topic_id = $topic_id
AND f.forum_id = t.forum_id
LIMIT 1";
}
else if ($post_id)
{
$sql = "SELECT t.*, f.*, p.post_time
FROM ". BB_TOPICS ." t, ". BB_FORUMS ." f, ". BB_POSTS ." p
WHERE p.post_id = $post_id
AND t.topic_id = p.topic_id
AND f.forum_id = t.forum_id
LIMIT 1";
}
// Get forum/topic data
if ($topic_id)
{
$sql = "SELECT t.*, f.*, u.username, u.user_avatar, u.user_avatar_type, u.user_opt
FROM ". BB_TOPICS ." t, ". BB_FORUMS ." f, ". BB_USERS ." u
WHERE t.topic_id = $topic_id
AND f.forum_id = t.forum_id
AND t.topic_poster = u.user_id
LIMIT 1";
}
else if ($post_id)
{
$sql = "SELECT t.*, f.*, p.post_time, u.username, u.user_avatar, u.user_avatar_type, u.user_opt
FROM ". BB_TOPICS ." t, ". BB_FORUMS ." f, ". BB_POSTS ." p, ". BB_USERS ." u
WHERE p.post_id = $post_id
AND t.topic_id = p.topic_id
AND f.forum_id = t.forum_id
AND t.topic_poster = u.user_id
LIMIT 1";
}
'U_SEARCH_SELF' => "search.php?uid={$userdata['user_id']}&t=$topic_id&dm=1",
'AUTHOR_NAME' => ($t_data['username'] != '') ? '<a href="'. PROFILE_URL . $t_data['topic_poster'] .'">'. $t_data['username'] .'</a>' : '';
'AUTHOR_AVATAR' => ($t_data['topic_poster'] != ANONYMOUS) ? get_avatar($t_data['user_avatar'], $t_data['user_avatar_type'], !bf($t_data['user_opt'], 'user_opt', 'allow_avatar')) : '';
'AUTHOR_NAME' => ($t_data['username'] != '') ? '<a href="'. PROFILE_URL . $t_data['topic_poster'] .'">'. $t_data['username'] .'</a>' : '',
'AUTHOR_AVATAR' => ($t_data['topic_poster'] != ANONYMOUS) ? get_avatar($t_data['user_avatar'], $t_data['user_avatar_type'], !bf($t_data['user_opt'], 'user_opt', 'allow_avatar')) : '',
Спасибо огромноеFoxBit,PHP:'AUTHOR_AVATAR' => ($t_data['topic_poster'] != ANONYMOUS) ? get_avatar($t_data['user_avatar'], $t_data['user_avatar_type'], !bf($t_data['user_opt'], 'user_opt', 'allow_avatar'), 50, 50) : '',