Protektor
Пользователь
ExPlayer свою функцию вывода аватарки подправь по аналогии
PHP:
function get_avatar($user_id, $ext_id, $allow_avatar = true, $size = true, $height = '', $width = '', $custom_style = '')
{
global $bb_cfg;
if ($size) {
// TODO размеры: s, m, l + кеширование
}
$height = !$height ? 'height="' . $height . '"' : '';
$width = !$width ? 'width="' . $width . '"' : '';
if($user_id == 2){
$custom_style = "style=\"box-shadow: 0 0 10px #006400;\"";
}
$user_avatar = '<img src="' . make_url($bb_cfg['avatars']['display_path'] . $bb_cfg['avatars']['no_avatar']) . '" ' . $custom_style . ' alt="' . $user_id . '" ' . $height . ' ' . $width . ' />';
if ($user_id == BOT_UID && $bb_cfg['avatars']['bot_avatar']) {
$user_avatar = '<img src="' . make_url($bb_cfg['avatars']['display_path'] . $bb_cfg['avatars']['bot_avatar']) . '" ' . $custom_style . ' alt="' . $user_id . '" ' . $height . ' ' . $width . ' />';
} elseif ($allow_avatar && $ext_id) {
if (file_exists(get_avatar_path($user_id, $ext_id))) {
$user_avatar = '<img src="' . make_url(get_avatar_path($user_id, $ext_id, $bb_cfg['avatars']['display_path'])) . '" ' . $custom_style . ' alt="' . $user_id . '" ' . $height . ' ' . $width . ' />';
}
}
return $user_avatar;
}