From 29b8e2d8f100e00fa210975bd03d2218d19e316f Mon Sep 17 00:00:00 2001 From: phpBBtr <166284197+phpbbtr@users.noreply.github.com> Date: Thu, 11 Apr 2024 00:40:22 +0300 Subject: [PATCH 1/2] Update functions.php Default avatar display --- phpBB/includes/functions.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 2f330096bf..e0c9d4394d 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -3620,6 +3620,20 @@ function phpbb_get_avatar($row, $alt, $ignore_config = false, $lazy = false) $avatar_data['src'] = ''; } + // Default avatar display + if (!$avatar_data['src']) + { + $phpbb_path_helper = $phpbb_container->get('path_helper'); + $web_path = $phpbb_path_helper->get_web_root_path(); + $theme = "{$web_path}styles/" . rawurlencode($user->style['style_path']) . '/theme'; + $no_avatar = $theme . '/images/no_avatar.gif'; + $src = 'src=' . $no_avatar . ' data-src=' . $no_avatar; + $html = ''; + } + if (empty($html) && !empty($avatar_data['src'])) { if ($lazy) From 0f8f012ce8de6dcd874d5494d4298205b2ada655 Mon Sep 17 00:00:00 2001 From: phpBB TR <166284197+phpbbtr@users.noreply.github.com> Date: Fri, 12 Apr 2024 17:54:50 +0300 Subject: [PATCH 2/2] Update functions.php 2 --- phpBB/includes/functions.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index e0c9d4394d..912311064a 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -3626,12 +3626,8 @@ function phpbb_get_avatar($row, $alt, $ignore_config = false, $lazy = false) $phpbb_path_helper = $phpbb_container->get('path_helper'); $web_path = $phpbb_path_helper->get_web_root_path(); $theme = "{$web_path}styles/" . rawurlencode($user->style['style_path']) . '/theme'; - $no_avatar = $theme . '/images/no_avatar.gif'; - $src = 'src=' . $no_avatar . ' data-src=' . $no_avatar; - $html = ''; + $src = 'src="' . $theme . '/images/no_avatar.gif"'; + $html = ''; } if (empty($html) && !empty($avatar_data['src']))