Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted January 9Jan 9 Looking through the online status code, I see that V5 has a build in online status for the forum post but the feature is disabled by default. This is a cool feature, I'm wondering why it was hidden with CSS? It can be activated with this CSS code. /* Author Online Status */ .ipsEntry__author-online { display: block; } Edited January 9Jan 9 by beats23
January 9Jan 9 Author The CSS code will make the online status pulse/flash like the hover card online status. /* Author Online Status */ .ipsEntry__author-online { border: 1.1em solid hsl(113deg 76.22% 37.79%); animation: ipsOnlineStatus 1s infinite; border-bottom-color: transparent; border-inline-end-color: transparent; display: block; }
January 9Jan 9 Author You can have the online status showing in the whole IPSv5 suite, in the forums, private messages and all the location where members comments. This is pretty cool, such a great feature shouldn't be hidden 🤗. You only need to create a simple app to hook the default author online status code to the comment wrapper template. Activate IPSv5 dev mode and use the code below to hook into the commentWrap {{if $comment->author()->isOnline() AND ( !$comment->author()->isOnlineAnonymously() OR ( $comment->author()->isOnlineAnonymously() AND \IPS\Member::loggedIn()->isAdmin() ) )}} <span class='ipsEntry__author-online' data-ipsTooltip title='{{if $comment->author()->isOnlineAnonymously()}}{lang="online_now_anon" sprintf="$comment->author()->name"}{{elseif $comment->author()->isOnline()}}{lang="online_now" sprintf="$comment->author()->name"}{{endif}}'></span> {{endif}} Settings to use in dev mode app creation. Online status on all the comment areas and in the private messages. Edited January 9Jan 9 by beats23
January 13Jan 13 Author Further inspection of the V5 online status code, revealed this in the CSS code file. /* ONLINE/OFFLINE */ .ipsOnlineStatus, .ipsOnlineStatus_online { color: #249168; } .ipsOnlineStatus_anonymous { color: #616161; } .ipsOnlineStatus_offline { color: #c7c7c7; } .ƒ { color: #bd9e22; } .ipsOnlineStatus_busy { color: #a03223; } This indicates that V5 has a much more advanced online status feature which will utilise different icon colours to indicate when a user is online, online anonymous, offline and busy. This feature is great, Is this a feature that was abandoned in v5 or is it a feature that we will receive later on in the future? You can use this code below and template hook settings instead of the one posted above when creating the app to activate the round online status indicator beside the user avatar and not at the top left corner of the comment message box. {{if $comment->author()->isOnline() AND ( !$comment->author()->isOnlineAnonymously() OR ( $comment->author()->isOnlineAnonymously() AND \IPS\Member::loggedIn()->isAdmin() ) )}} <span class='ipsOnlineStatus' data-ipsTooltip title='{{if $comment->author()->isOnlineAnonymously()}}{lang="online_now_anon" sprintf="$comment->author()->name"}{{elseif $comment->author()->isOnline()}}{lang="online_now" sprintf="$comment->author()->name"}{{endif}}'></span> {{endif}} Edited January 13Jan 13 by beats23
January 13Jan 13 Management It's something we're playing with. Any expansion on the status on not on the roadmap for 5.0.0.
January 13Jan 13 It looks good with the green circle on the avatar, that's where it should be. Never understood why this feature was removed years ago (likewise a few other things that have made their way back eventually). I have always used a hook to have mine like this Edited January 13Jan 13 by marklcfc
January 13Jan 13 Management It can be unreliable when you're not using the Node (cloud) APIs as it is based on where the member last clicked, and for efficiency that is only updated once every three minutes or so.