Support Forum

Is it Possible to Color Code User Groups?

AP April
April
Member

Yes it is me again, promised I would be back. I have a coding question, I looked through the first 3 pages of this section and didn’t find anything so forgive me if I missed this. I am wondering if it is possible to give colors to different user groups on the forum software. I have in the past used phpBB and VB and with both you can set usergroup names to different colors making it easier to pick out who is who, for example admins are usually red and mods are usually green. Is there a way to do this as right now everyone is black.

18 Answers

New Answer

MP Mr Papa
Mr Papa
Member

yes you can!  so you really need to get firefox and firebug here…  invaluable for debugging and css tweaks…

but each row or post in the topic view is given a style for the users usergroup memberships… so you can uniquely style based on the usergroup class…

the style, applied to the row (also has class spTopicPostSection) will be of the form:

spUsergroup-name

where name is the name of the usergroup, ie spUsergroup-members

p.s.  too bad thats not an Xbox 360 site! kisscoolwink

AP April
April
Member

Mr Papa said

yes you can!  so you really need to get firefox and firebug here…  invaluable for debugging and css tweaks…

but each row or post in the topic view is given a style for the users usergroup memberships… so you can uniquely style based on the usergroup class…

the style, applied to the row (also has class spTopicPostSection) will be of the form:

spUsergroup-name

where name is the name of the usergroup, ie spUsergroup-members

p.s.  too bad thats not an Xbox 360 site! kisscoolwink

Okay, I will try it.


Oh and my site is not only playstation but also we do have pc, wii and Xbox topics, and even others who play xbox there as well. Maybe we can see you there . wink

MP Mr Papa
Mr Papa
Member

let us know how it goes… several folks requested that but have not seen any use of it yet…

AP April
April
Member

Mr Papa said

let us know how it goes… several folks requested that but have not seen any use of it yet…

Omg this is hard for me. Well I am just learning coding so I am lost >< I really want to assign colors to user groups. Hmmm is there a section on this forum to possibly ask for a bit of help from others? I feel I might need someone who knows what they are doing to come over and help me with this. confused

YS Yellow Swordfish
Yellow Swordfish
Member

try adding to your theme CSS:

.spUsergroup-members { background-color: #XXXXXX; )

where ‘members’ is the name of your usergroup and XXXXXX is the colour you want the background to be.

That is assuming it is the background you want to colourise.

AP April
April
Member

Yellow Swordfish said

try adding to your theme CSS:

.spUsergroup-members { background-color: #XXXXXX; )

where ‘members’ is the name of your usergroup and XXXXXX is the colour you want the background to be.

That is assuming it is the background you want to colourise.

Umm, the background?  I want to change the colors of the members names according to their usergroups. So I don’t think it is the background I want to color is it? Like I want to set it up like this, admin is red, mod is green, blogger is orange, etc. If I knew exactly where in the CSS to change the main parts…..arrrgggghh

MP Mr Papa
Mr Papa
Member

then change background-color to color…

its not a change…  you have to add it… by default, none of our themes color by usergroup so we dont have css for it… so you have to add it yourself… additionally, there is really no way for us to know ahead of time what your usergroups might be called…

AP April
April
Member

So does it matter where in the CSS I add this? Can I just add it at the bottom?

 

EDIT, I added the code you provided me and replaced the usergroup with admin. Then changed the xxxx with the web color I wanted to use and still nothing changes. I pasted the code into the bottom of the theme btw.

YS Yellow Swordfish
Yellow Swordfish
Member

If you give me a link to a forum/topic or whatever that has an example of that on it I can take a quick look.

AP April
April
Member

Yellow Swordfish said

If you give me a link to a forum/topic or whatever that has an example of that on it I can take a quick look.

No I changed it in themes, in the CSS I added that code to the bottom and the colors were still the same so I changed it back again.

AP April
April
Member

Sorry for the double post, but I had asked a question and am not sure if anyone has read it yet. Where in the CSS am I supposed to add the piece of code you provided me for the user groups? I added it to the bottom and nothing happened. Is there a certain section that it should go?

YS Yellow Swordfish
Yellow Swordfish
Member

Well yes I did answer it in the post before. Put it back where you out it before and let me have a look.

SP SPQC
SPQC
Member

I gave this a try, I added .spUsergroup-admin { color: #FF0000; } to the custom.css file of my theme and nothing happened.  I’m not too skilled with CSS either so I must have it wrong.

 

Hey April, your best bet is make a feature request for a next version.  wink  I also think this could be used by many as like you said, some popular forum software already offer that option.  S:P is the work of 2-3 guys only and this must also be taken into consideration.

MP Mr Papa
Mr Papa
Member

you just need to drill down a bit further to exactly what you want to change…  some of the lower level css will already have a color, so specifying at a higher level will get overridden…

what were you actually trying to change to red (#ff0000)?

firefox and firebug are invaluable in doing things like this… inspect the text you want to change and it will give you a complete hierarchy of the styles on that element…