Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Changing color of members currently online
Avatar
Kimi
Member
Free Members
sp_UserOfflineSmall Offline
Mar 22, 2014 - 2:23 pm

Hi there,

Is there a way to change the color of the members online based on their groups? Like in other forums, admins are usually red in color, mods blue, etc. I'd like to be able to do that on these boards as well.

Thanks!

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 22, 2014 - 6:12 pm

yup, already there... you just have to add the styling you want...

check the display name html... you will see multiple classes added to the div based on user attributes (ie type, usergroup, etc)... you just have to add the style (ie the color)....

Avatar
Kimi
Member
Free Members
sp_UserOfflineSmall Offline
Mar 22, 2014 - 10:46 pm

Hi, I understand what you're saying, but where do I find that? Is that in the main stylesheet? And if so, what do I search for? I didn't see in there where to add or change color.

 

Thanks

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 23, 2014 - 12:32 am

you would need to add the styles to your sp theme - be sure to have your own vice editing one of ours... see:  http://codex.simple-press.com/.....g-a-theme/

as to the styles needed, inspect the css using your browser dev tools for the needed classes...  they will be dependent on your usergroup names, so I cannot exactly tell you with out more...  but here, for example, is your name styling:

<div id="post139159" class="spTopicPostSection spOdd spUnreadPosts spType-User spRank-member spSpecialRank-gold-member spUsergroup-gold-members spUserPost

so lots of classes in there...  your rank, user type, special rank and usergroup...  so say I wanted to style the usergroup you are in, spUsergroup-gold-members, I could do:

.spUsergroup-gold-members .spPostUserName a {
color: #ff0000;
}

and your name would appear in red...  this would be for the user name in the user section next to posts...

Avatar
Kimi
Member
Free Members
sp_UserOfflineSmall Offline
Mar 23, 2014 - 2:34 am

Just to be sure, is it in my main styles.php or the theme overlay? And yes, I have a different theme, I just want to make sure of the exact file I need to edit.

 

Thanks!

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 23, 2014 - 5:28 am

If you want to add very specific classes, styles and colours then use the main theme CSS file - or PHP file if a theme that utilises overlays.

But... I suspect Steve (Mr Papa) may have misinterpreted the question. Yes - these classes are added to the name of the user in the post areas in a topic but you have specified 'currently online' and I interpret that to mean the list of users online in the stats area at the bottom. Such classes are not applied there - actually for the very simple reason that it would add query/data overhead that most would not want.

Having said that - I rather like the notion that we should be consistent so I think I will write up a request on getting the classes added.

If, of course, you did mean as Steve interpreted it then yes - the classes are added to the html output.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 23, 2014 - 12:50 pm

argh... yeah, sorry thought you meant the user info area of topic view (post list)... As Andy said, will have to make an update for that...

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 23, 2014 - 12:53 pm

Have added to the forthcoming 5.4.2

andy-signature.png
YELLOW
SWORDFISH
Avatar
Kimi
Member
Free Members
sp_UserOfflineSmall Offline
Mar 23, 2014 - 3:33 pm

Yep, you're current. I want it to show up in the "current users online" area on the bottom :)

 

So just to be clear, it's not possible yet, but will be in an update? 

Thanks!

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 23, 2014 - 3:45 pm

Yes - I added the code this morning. 5.4.2 will coincide with the release of WordPress 3.9.0 currently in beta 2 phase.

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17361
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625