|
|
|
Funzioni di phpBB 3
|
|
|
Domande?
|
Troverai maggiori informazioni nel Thread Ufficiale della Funzione get_user_avatar
|
Accedi alla home della sezione delle Funzioni di phpBB 3 o alla sezione PhpBB 3 o alla Home del Forum GT
|
get_user_avatar è una funzione di phpBB 3 che visualizza l'avatar dell'utente.
Sintassi:
function get_user_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="' . (str_replace(' ', '%20', $avatar_img)) . '" width="' .
$avatar_width . '" height="' . $avatar_height . '" alt="' .
((!empty($user->lang[$alt])) ? $user->lang[$alt] : $alt) . '" />';
}