1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 21:57:51 +02:00

Allow toAvatar to receive the 'class' attribute.

This commit is contained in:
Cameron
2017-11-01 15:13:02 -07:00
parent 3e21d5eab5
commit a1272e8dbe

View File

@@ -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 .= "<img ".$id."class='".$shape." user-avatar".$classOnline."' alt=\"".$title."\" src='".$img."' width='".$width."' ".$heightInsert." />";
$text .= "<img ".$id."class='".$class.$classOnline."' alt=\"".$title."\" src='".$img."' width='".$width."' ".$heightInsert." />";
$text .= $linkEnd;
// return $img;
return $text;