mirror of
https://github.com/e107inc/e107.git
synced 2025-08-13 18:14:26 +02:00
When a user is online an additional CSS class is automatically added to the user avatar: user-avatar-online
This commit is contained in:
@@ -3660,7 +3660,8 @@ class e_parser
|
||||
$userData = array();
|
||||
$userData['user_id'] = USERID;
|
||||
$userData['user_image'] = USERIMAGE;
|
||||
$userData['user_name'] = USERNAME;
|
||||
$userData['user_name'] = USERNAME;
|
||||
$userData['user_currentvisit'] = USERCURRENTVISIT;
|
||||
}
|
||||
|
||||
|
||||
@@ -3714,8 +3715,10 @@ class e_parser
|
||||
$heightInsert = empty($height) ? '' : "height='".$height."'";
|
||||
$id = (!empty($options['id'])) ? "id='".$options['id']."' " : "";
|
||||
|
||||
$classOnline = (!empty($userData['user_currentvisit']) && intval($userData['user_currentvisit']) > (time() - 300)) ? " user-avatar-online" : '';
|
||||
|
||||
$text = $linkStart;
|
||||
$text .= "<img ".$id."class='".$shape." user-avatar' alt=\"".$title."\" src='".$img."' width='".$width."' ".$heightInsert." />";
|
||||
$text .= "<img ".$id."class='".$shape." user-avatar".$classOnline."' alt=\"".$title."\" src='".$img."' width='".$width."' ".$heightInsert." />";
|
||||
$text .= $linkEnd;
|
||||
// return $img;
|
||||
return $text;
|
||||
|
Reference in New Issue
Block a user