From a1272e8dbe9d5124570464fc90939c45e7cef9df Mon Sep 17 00:00:00 2001 From: Cameron Date: Wed, 1 Nov 2017 15:13:02 -0700 Subject: [PATCH] Allow toAvatar to receive the 'class' attribute. --- e107_handlers/e_parse_class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/e107_handlers/e_parse_class.php b/e107_handlers/e_parse_class.php index 5942c3efc..653f04f21 100644 --- a/e107_handlers/e_parse_class.php +++ b/e107_handlers/e_parse_class.php @@ -4071,6 +4071,7 @@ class e_parser $title = (ADMIN) ? $image : $tp->toAttribute($userData['user_name']); $shape = (!empty($options['shape'])) ? "img-".$options['shape'] : "img-rounded rounded"; + if(!empty($options['type']) && $options['type'] === 'url') { return $img; @@ -4082,8 +4083,10 @@ class e_parser $classOnline = (!empty($userData['user_currentvisit']) && intval($userData['user_currentvisit']) > (time() - 300)) ? " user-avatar-online" : ''; + $class = !empty($options['class']) ? $options['class'] : $shape." user-avatar"; + $text = $linkStart; - $text .= "\"".$title."\""; + $text .= "\"".$title."\""; $text .= $linkEnd; // return $img; return $text;