Als ik mijn profiel bekijk, zie ik wel m'n avatar. Via phpmyadmin zie ik dat in de phpbb_users tabel de user_avatar_type op 2 staat. Maar wanner ik een topic wil bekijken blijkt dat user_avatar_type=0 is. Met andere worden er word geen avatar weergegeven.
Via dit stukje in de viewtopic.php wordt de tabel uit gelezen
Code: Selecteer alles
$sql = "SELECT u.user_trophies, u.username, u.user_id, u.user_posts, u.user_custom_title, u.user_from, u.user_realname, u.user_from_flag, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_avatar, u.user_avatar_type, u.user_allowavatar, u.user_allowsmile, u.user_allow_viewonline, u.user_session_time, u.user_warnings, u.user_level, u.user_birthday, u.user_next_birthday_greeting, u.user_avatar_width, u.user_avatar_height, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid, m.longitude, m.latitude
FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u LEFT JOIN " . MAP_MOD_USER_TABLE . " m ON u.user_id=m.user_id, " . POSTS_TEXT_TABLE . " pt
WHERE p.topic_id = $topic_id
$limit_posts_time
AND pt.post_id = p.post_id
AND u.user_id = p.poster_id
ORDER BY p.post_time $post_time_order
LIMIT $start, ".(isset($finish)? ((($finish - $start) > 0)? ($finish - $start): -$finish): $board_config['posts_per_page']);
Code: Selecteer alles
$poster_avatar = '';
if ( $userdata['session_logged_in'] && $postrow[$i]['user_avatar_type'] && $poster_id != ANONYMOUS && $postrow[$i]['user_allowavatar'] )
{
switch( $postrow[$i]['user_avatar_type'] )
{
case USER_AVATAR_UPLOAD:
$poster_avatar = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $postrow[$i]['user_avatar'] . '" alt="" border="0" />' : '';
break;
case USER_AVATAR_REMOTE:
if ( $board_config['allow_avatar_remote'] )
{
if ( ($postrow[$i]['user_avatar_height'] && $postrow[$i]['user_avatar_height'] > 0) &&
($postrow[$i]['user_avatar_width'] && $postrow[$i]['user_avatar_width'] > 0) )
{
$poster_avatar = '<img src="' . $postrow[$i]['user_avatar'] . '" height="' . $postrow[$i]['user_avatar_height'] . '" width="' . $postrow[$i]['user_avatar_width'] . '" alt="" border="0" />';
}
else // No width/height in the user's profile
{
$poster_avatar = '<img src="' . $postrow[$i]['user_avatar'] . '" alt="" border="0" />';
}
}
else // remote avatars not allowed
$poster_avatar = '';
break;
case USER_AVATAR_GALLERY:
$poster_avatar = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $postrow[$i]['user_avatar'] . '" alt="" border="0" />' : '';
break;
}
}Hoop dat iemand mij in de juiste richting kan wijzen
