Code css if user online or offline

Get help developing custom BBCodes or request one.
Post Reply
User avatar
Christian 2.0
Former Team Member
Posts: 4442
Joined: Wed Nov 04, 2009 11:16 pm
Location: UK
Name: Christian
Contact:

Re: Code css if user online or offline

Post by Christian 2.0 » Tue Dec 19, 2017 1:50 am

Hello :)

Just a couple of questions

1) Are you asking how to replicate the online/offline indicator you see in the screenshot?
2) Or are you asking how to recolour the post background if the user is online/offline?
3) Which style are you using? If it's custom, can you share a link to your forum?

Thanks :)
🚀 Premium phpBB Styles
Premium 3.2 Styles: Modern phpBB Style, NEW - Volare Material phpBB Style
Premium 3.2 Extensions: phpBB sidebar Extension
Custom work available on request

User avatar
Sniper_E
Registered User
Posts: 719
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey
Contact:

Re: Code css if user online or offline

Post by Sniper_E » Tue Dec 19, 2017 5:32 am

Christian 2.0 wrote:
Tue Dec 19, 2017 1:50 am
2) Or are you asking how to recolour the post background if the user is online/offline?
I think Christian asks that is because what you point to is a image like used in prosilver: Image

I use a onine and offline image. In my style I use this IF statement in the viewtopic_body.html

Code: Select all

<!-- IF postrow.S_ONLINE and not postrow.S_POST_HIDDEN --> online<!-- ELSE --> offline<!-- ENDIF -->
And in the colours.css

Code: Select all

.online { background-image: url("./images/icon_user_online.gif"); }
.offline { background-image: url("./images/icon_user_offline.gif"); }
And the .online { class line in the content.css needs to change to .online, .offline {
I always have one or the other image showing in a mini profile.

You would have to have two different color images like you have showing in your pic.
Then use these codes above to show the other one when offline.
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
:!: Sniper_E Styles | phpbbmodders :!:

Post Reply

Return to “Custom BBCode Development and Requests”

Who is online

Users browsing this forum: No registered users and 4 guests