inherit
\o/ ^o^ /o_ /o\
16464
0
Jul 22, 2024 13:57:10 GMT -8
pawl
29,621
November 2003
pollo
Pink Stars
|
Post by pawl on Jan 19, 2013 9:33:22 GMT -8
Having a play with the way that Groups display in the Groups tab of a members profile. Adding in the group's stars above the description was easy enough, but I'm struggling with getting the group name to adopt the colour it adds to a members' display name.
What I mean by this is that when you look at the list of available Groups (including staff), they all have the default link colour. I want the Admin group to have the Admin colour (red here, for example), Mod group to have Mod colour (green here), etc etc.
I've tried the following, but it doesn't seem to work;
{foreach $[group]} <tr id="$[group.content_id]" class="$[group.content_class]"> <td class="group_desc"> <a href="$[group.href]"><span style="color: $[group.color];">$[group.name]</span></a> <br />
Just thought I'd see if anyone else knew a way, or if the [group.color] is actually for something else. I've looked elsewhere in the forum, but everywhere the colour is used it's an inline style that seems to be linked to the $[user.name] variable, so it's not visible. <_<
|
|
inherit
186624
0
Aug 11, 2023 14:38:15 GMT -8
Mabel Pines
110
December 2012
mabelpines
|
Post by Mabel Pines on Jan 19, 2013 9:46:19 GMT -8
Try this.
{foreach $[group]} <tr id="$[group.content_id]" class="$[group.content_class]"> <td class="group_desc"> <a href="$[group.href]"><span class="color: #$[group.color];">$[group.name]</span></a> <br />
|
|
inherit
\o/ ^o^ /o_ /o\
16464
0
Jul 22, 2024 13:57:10 GMT -8
pawl
29,621
November 2003
pollo
Pink Stars
|
Post by pawl on Jan 19, 2013 10:05:58 GMT -8
All this time, and I was just missing the hash? Unbelievable. >_> Spent ages playing with it, not sure how I never tried that, haha. Didn't realise it was required though, either. Also worth pointing out that while I wrote span class in the OP, I was actually writing span style in the template, like I intended, haha.
Got it working though, turns out that I am in fact just a pleb. xD
|
|
inherit
186624
0
Aug 11, 2023 14:38:15 GMT -8
Mabel Pines
110
December 2012
mabelpines
|
Post by Mabel Pines on Jan 19, 2013 10:13:14 GMT -8
If you need to know what exactly a variable contains just go to a testing style, edit the templates and put the variable somewhere where it'll be visible, then go to that page on your forum and you can see exactly what the variable contains. It's sort of like opening Christmas presents.
|
|
inherit
\o/ ^o^ /o_ /o\
16464
0
Jul 22, 2024 13:57:10 GMT -8
pawl
29,621
November 2003
pollo
Pink Stars
|
Post by pawl on Jan 19, 2013 11:28:34 GMT -8
That's what I usually do, however in this case it wouldn't have worked anyway, because I was needing the hash to get the style to work in the first place. =P Worked out why I never tried it - apparently the hash key doesn't exist on Mac keyboards o.o
|
|
inherit
186624
0
Aug 11, 2023 14:38:15 GMT -8
Mabel Pines
110
December 2012
mabelpines
|
Post by Mabel Pines on Jan 19, 2013 14:18:07 GMT -8
That's what I usually do, however in this case it wouldn't have worked anyway, because I was needing the hash to get the style to work in the first place. =P Worked out why I never tried it - apparently the hash key doesn't exist on Mac keyboards o.o That's why I said to place it somewhere where the contents of the variable will actually display. For example I just tossed that variable into a location on my member list template where it would actually display the contents of the variable on the page, then I went to the member list page and it showed the text 8b008b where had placed the variable. Sometimes sticking a variable somewhere where it really doesn't belong is a great way to learn... wow, that sounded really inappropriate.
|
|
inherit
\o/ ^o^ /o_ /o\
16464
0
Jul 22, 2024 13:57:10 GMT -8
pawl
29,621
November 2003
pollo
Pink Stars
|
Post by pawl on Jan 19, 2013 14:27:32 GMT -8
Yeah, realised that after I posted, just couldn't be bothered to go back and edit it. Need to get used to actually attempting to break stuff again, haha. That or I should try learning what I'm doing in the first place - before the BetaZone started I'd not touched HTML or CSS in about 5 years, slightly rusty to say the least, and I've got a lot to relearn. xD
|
|