Jump to content

  •  

Staff applications open!

We are currently in need of more staff members. Feel you are ready to take on the tasks of being a Community Team Member? Apply today here: http://invision-viru...f-applications/
IV Management

- - - - -

Online/offline status in posts (ips 4.x)


  • Please log in to reply
No replies to this topic

#1 Mazzoni

Mazzoni

    Advanced Member

  • Member
  • PipPipPip
  • 35 posts
  • LocationSão Paulo, Brasil

Posted 06 May 2022 - 10:33 PM

Attached File  Screen Shot 2022-05-06 at 12.28.15.png   127.49K   32 downloads

Open the post template: forums > front > topics > postContainer
To find:
<h3 class = 'ipsType_sectionHead cAuthorPane_author ipsType_blendLinks ipsType_break' >

Add after:
{{if $comment->author()->isOnline()}} <span class = "ipsOnlineStatus_online" data-ipsTooltip title = "{$comment-> author()->name} is online">On </span> {{else}} <span class = "ipsOnlineStatus_offline" data-ipsTooltip title = "{$comment-> author()->name} is offline">Off </span> {{endif}}

Now in custom.css:

.ipsComment_author .ipsOnlineStatus_online,
.ipsComment_author .ipsOnlineStatus_offline {
background: #7aa984;
color: #fff;
padding: 2px 5px;
font-size: 11px;
border-radius: 3px;
position: absolute;
left: 6px;
top: 6px;
}
.ipsComment_author .ipsOnlineStatus_offline {
background:#ebeff3;
color:#788b9c;
}

Credits: IPBMAFIA.RU




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users