Former Member
inherit
guest@proboards.com
255752
0
Nov 29, 2024 6:52:31 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Jul 18, 2018 13:21:26 GMT -8
Hi. I'm wanting to use a custom field value to change the color of a user's mini icon in the online users section.
This is the part of the CSS in question.
.operationinfoicons {
float:left;
margin-left:5px;
margin-top:5px;
border:solid 5px #292929 ;
}
Basically, I just want to replace the #292929 with a different color for each user group. That user field is - "UserGroupColor" and it's value will be a color manually put in for each member of that group.
Can I do that through something like - ".custom.field.value"?
|
|
#eb7100
33409
0
1
Nov 24, 2024 4:27:37 GMT -8
Brian
48,130
November 2004
smashmaster3
|
Post by Brian on Jul 18, 2018 13:33:19 GMT -8
Hi, @phantasmic.
The forum's style sheet isn't currently able to access layout template variables so the only way you'd be able to accomplish this is through the layout templates themselves.
Any other CSS properties not specific to that particular user can stay in the style sheet, but the one that's specific to the user can be added as an inline style. Since you're apparently styling a link you can add this among its attributes:
|
|
Former Member
inherit
guest@proboards.com
255752
0
Nov 29, 2024 6:52:31 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Jul 18, 2018 13:55:54 GMT -8
Where would that line of code go? Sorry, not really great at coding yet. (This is the area in question, aiming to change the green borders around the user's avatar.)
|
|
#eb7100
33409
0
1
Nov 24, 2024 4:27:37 GMT -8
Brian
48,130
November 2004
smashmaster3
|
Post by Brian on Jul 18, 2018 14:00:24 GMT -8
In Themes > Layout Templates > Home this is the HTML that your CSS is targeting:
You would change that to this:
|
|
Former Member
inherit
guest@proboards.com
255752
0
Nov 29, 2024 6:52:31 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Jul 18, 2018 14:11:16 GMT -8
Thank you. And how do I set the color for each user?
|
|
#eb7100
33409
0
1
Nov 24, 2024 4:27:37 GMT -8
Brian
48,130
November 2004
smashmaster3
|
Post by Brian on Jul 18, 2018 14:14:31 GMT -8
Assuming you're using groups to set each user's color the forum should plug those in automatically with that code change.
If you intended to do it via custom fields it would require a different code.
|
|
Former Member
inherit
guest@proboards.com
255752
0
Nov 29, 2024 6:52:31 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Jul 18, 2018 14:21:09 GMT -8
Hmm, doesn't seem to be working then. Might have something to do with the skin styling links automatically?
Edit: Anyway, it's not a necessary thing. Thanks for the help!
|
|
#eb7100
33409
0
1
Nov 24, 2024 4:27:37 GMT -8
Brian
48,130
November 2004
smashmaster3
|
Post by Brian on Jul 18, 2018 14:57:33 GMT -8
The last code was for the users online in the last 24 hours. I was just using the first instance of the class in the CSS you posted being referenced, so my bad for the regular users online skipping my mind. For the users currently online it's essentially the same thing. Replace this line: With this:
|
|
Former Member
inherit
guest@proboards.com
255752
0
Nov 29, 2024 6:52:31 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Jul 18, 2018 18:28:30 GMT -8
So I contacted the creator of the skin and she provided this:
For anyone looking to do the same thing, this was for the Operation: Mindcrime skin by Pharaoh Leap.
In the end this is what the relevant code looked like.
Thank you for the help though Brian, I appreciate it!
|
|