1. in include/functions.php
Cerca:
Codice: Seleziona tutto
?>
Codice: Seleziona tutto
function get_avatar($avatar, $avatar_type, $avatar_width, $avatar_height, $alt = 'USER_AVATAR')
{
global $user, $config, $phpbb_root_path, $phpEx;
if (empty($avatar) || !$avatar_type)
{
return '';
}
$avatar_img = '';
switch ($avatar_type)
{
case AVATAR_UPLOAD:
$avatar_img = $phpbb_root_path . "download/file.$phpEx?avatar=";
break;
case AVATAR_GALLERY:
$avatar_img = $phpbb_root_path . $config['avatar_gallery_path'] . '/';
break;
}
$avatar_img .= $avatar;
return '<img src="' . $avatar_img . '" width="' . $avatar_width . '" height="' . $avatar_height . '" alt="' . ((!empty($user->lang[$alt])) ? $user->lang[$alt] : $alt) . '" />';
}
Codice: Seleziona tutto
$sql = 'SELECT username, username_clean, user_id, user_type, user_allow_viewonline, user_colour
Codice: Seleziona tutto
$sql = 'SELECT username, username_clean, user_id, user_type, user_allow_viewonline, user_colour, user_avatar, user_avatar_type, user_avatar_width, user_avatar_height
Cerca:
Codice: Seleziona tutto
$user_online_link = get_username_string(($row['user_type'] <> USER_IGNORE) ? 'full' : 'no_profile', $row['user_id'], $row['username'], $row['user_colour']);
$online_userlist .= ($online_userlist != '') ? ', ' . $user_online_link : $user_online_link;
Codice: Seleziona tutto
$user_online_link = get_username_string(($row['user_type'] <> USER_IGNORE) ? 'full' : 'no_profile', $row['user_id'], $row['username'], $row['user_colour']);
if(!$item_id)
{
$user_online_profile = get_username_string(($row['user_type'] <> USER_IGNORE) ? 'profile' : 'no_profile', $row['user_id'], $row['username'], $row['user_colour']);
$user_online_full = get_username_string(($row['user_type'] <> USER_IGNORE) ? 'full' : 'no_profile', $row['user_id'], $row['username'], $row['user_colour']);
$avatar = ($row['user_avatar']) ? get_avatar($row['user_avatar'], $row['user_avatar_type'], ($row['user_avatar_width'] > $row['user_avatar_height']) ? 50 : (50 / $row['user_avatar_height']) * $row['user_avatar_width'], ($row['user_avatar_height'] > $row['user_avatar_width']) ? 50 : (50 / $row['user_avatar_width']) * $row['user_avatar_height']) : $user_online_link;
if($row['user_avatar'])
{
$user_online_link = '<a href="'.$user_online_profile.'">'.$avatar.'</a>';
}
}
$online_userlist .= ($online_userlist != '') ? ', ' . $user_online_link : $user_online_link;
Codice: Seleziona tutto
$user_online_link = get_username_string(($row['user_type'] <> USER_IGNORE) ? 'full' : 'no_profile', $row['user_id'], $row['username'], $row['user_colour']);
if(!$item_id)
{
$user_online_profile = get_username_string(($row['user_type'] <> USER_IGNORE) ? 'profile' : 'no_profile', $row['user_id'], $row['username'], $row['user_colour']);
$user_online_full = get_username_string(($row['user_type'] <> USER_IGNORE) ? 'full' : 'no_profile', $row['user_id'], $row['username'], $row['user_colour']);
$avatar = ($row['user_avatar']) ? get_avatar($row['user_avatar'], $row['user_avatar_type'], ($row['user_avatar_width'] > $row['user_avatar_height']) ? 50 : (50 / $row['user_avatar_height']) * $row['user_avatar_width'], ($row['user_avatar_height'] > $row['user_avatar_width']) ? 50 : (50 / $row['user_avatar_width']) * $row['user_avatar_height']) : '';
if(!$item_id)
{
$user_online_link = $avatar.$user_online_link;
}
}
$online_userlist .= ($online_userlist != '') ? ', ' . $user_online_link : $user_online_link;