aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2015-08-09 10:31:37 +0200
committerMarc Alexander <admin@m-a-styles.de>2015-08-09 10:31:37 +0200
commit668defcf5705699be3a15548c08a3ea6c79086af (patch)
treeb1ce1a7a04280d7d45d6320a191af75cb0e058bc /phpBB/includes
parent5f4943c183e334d517acb84711f3b1dee6918ded (diff)
parent7cb7ca57c2f7a5f5b70749bc04f50f05046eeb9f (diff)
downloadforums-668defcf5705699be3a15548c08a3ea6c79086af.tar
forums-668defcf5705699be3a15548c08a3ea6c79086af.tar.gz
forums-668defcf5705699be3a15548c08a3ea6c79086af.tar.bz2
forums-668defcf5705699be3a15548c08a3ea6c79086af.tar.xz
forums-668defcf5705699be3a15548c08a3ea6c79086af.zip
Merge pull request #3784 from Senky/ticket/14043
[ticket/14043] Add core.get_avatar_after php event
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/functions.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 82aa91429c..fff55d993e 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -4823,7 +4823,7 @@ function phpbb_get_avatar($row, $alt, $ignore_config = false, $lazy = false)
{
global $user, $config, $cache, $phpbb_root_path, $phpEx;
global $request;
- global $phpbb_container;
+ global $phpbb_container, $phpbb_dispatcher;
if (!$config['allow_avatar'] && !$ignore_config)
{
@@ -4884,6 +4884,20 @@ function phpbb_get_avatar($row, $alt, $ignore_config = false, $lazy = false)
'alt="' . ((!empty($user->lang[$alt])) ? $user->lang[$alt] : $alt) . '" />';
}
+ /**
+ * Event to modify HTML <img> tag of avatar
+ *
+ * @event core.get_avatar_after
+ * @var array row Row cleaned by \phpbb\avatar\manager::clean_row
+ * @var string alt Optional language string for alt tag within image, can be a language key or text
+ * @var bool ignore_config Ignores the config-setting, to be still able to view the avatar in the UCP
+ * @var array avatar_data The HTML attributes for avatar <img> tag
+ * @var string html The HTML <img> tag of generated avatar
+ * @since 3.1.6-RC1
+ */
+ $vars = array('row', 'alt', 'ignore_config', 'avatar_data', 'html');
+ extract($phpbb_dispatcher->trigger_event('core.get_avatar_after', compact($vars)));
+
return $html;
}