The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Username Prefix based on groups

3 posters

Go down

Solved Username Prefix based on groups

Post by stelios102 June 27th 2014, 8:28 am

Hello,

First off I want to say that i've looked into this topic and seen both of the following forums.

https://help.forumotion.com/t123998-prefix-to-usernames?highlight=prefix

https://help.forumotion.com/t96136-group-s-style-on-legend-glitter-icon-glow

That said I've still been unable to accomplish my goal. I want users who are in a group to have a specific Prefix like a tag (ex. [TAG] Stelios102). I've added the code listed below to the CSS sheet in the Administration section General > Colors > CSS Stylesheet and submited it. Before anyone asks I have updated the code for a group on my forums. An example of a group on my forums and how I have added it is also below. However the username tags are not appearing anywhere. Im not sure if the issue is due to users being part of more then one group even if only one of those groups has the tag is causing it or if I've added the CSS to an incorrect CSS sheet.

Does anyone have any ideas?

Code:
a[href="/u1"] span:before {
content: "[ADMIN] ";
font-weight:bold;
}

Code:
a[href="/g7-second-battleground"] span:before {
content: "[2BG] ";
}


Last edited by stelios102 on June 28th 2014, 2:05 am; edited 1 time in total
avatar
stelios102
New Member

Posts : 7
Reputation : 1
Language : English

http://naga.motionsforum.com

Back to top Go down

Solved Re: Username Prefix based on groups

Post by Jophy June 27th 2014, 10:02 am

Hello,

Try this instead:

For user:

Code:
a[href="/u1"]:before {
content: "[ADMIN] ";
font-weight:bold;
}

Groups:

Code:
a[href="/g7-second-battleground"]:before {
content: "[2BG] ";
}
Jophy
Jophy
ForumGuru

Male Posts : 17924
Reputation : 836
Language : English
Location : Somewhere

Back to top Go down

Solved Re: Username Prefix based on groups

Post by stelios102 June 27th 2014, 10:31 am

Ok so i tinkered a bit. The group code you gave me does not seem to modify the group members at all however the below code added the tag after my name.

a[href="/u1"]:before {
content: "[ADMIN] ";
font-weight:bold;
}

I then changed it too this code and that added the tag before my name. However the group members are still not getting tags for some reason. I've added a link to a picture of the CSS sheet. Maybe im doing it wrong.

a[href="/u1"] span:before {
content: "[ADMIN] ";
font-weight:bold;
}

http://puu.sh/9M8NH/15e60d3ced.png
avatar
stelios102
New Member

Posts : 7
Reputation : 1
Language : English

http://naga.motionsforum.com

Back to top Go down

Solved Re: Username Prefix based on groups

Post by Jophy June 27th 2014, 10:47 am

The code for the group will not give all the group members that prefix because it's only a selector for the group, I'm pertaining to this:

Code:
a[href="/g7-second-battleground"]:before

You will need to find the uid of the group members like this:

Code:
a[href="/u1"]:before

Your user id is 'u1' so it was applied to you. You need to find the other ui's of that group members to have the prefix placed on their username, example:

Code:
a[href="/u1"]:before /* User1 of the grup */
a[href="/u20"]:before /*User2 of the group*/
a[href="/u40"]:before /*User 3 of the group */

Once compiled, this would be the code:

Code:
a[href="/u1"]:before ,a[href="/u20"]:before ,a[href="/u40"]:before {
 content: "[2BG] ";
}

To know the u id of the members, click their username link, at the end of the link you'll find their uId.
Jophy
Jophy
ForumGuru

Male Posts : 17924
Reputation : 836
Language : English
Location : Somewhere

Back to top Go down

Solved Re: Username Prefix based on groups

Post by stelios102 June 27th 2014, 11:31 am

Im trying to create tags for all members who join these groups. We are talking 100s of people. Is there no way to create a tag that applies itself too all of the members of a group without creating a tag for each individual member? I've seen it done on many of the forums or maybe im just not understanding.
avatar
stelios102
New Member

Posts : 7
Reputation : 1
Language : English

http://naga.motionsforum.com

Back to top Go down

Solved Re: Username Prefix based on groups

Post by Ange Tuteur June 27th 2014, 4:39 pm

Hi stelios,

Please read the following tutorial for customizing Usernames according to their group.
https://help.forumotion.com/t131443-customize-usernames-according-to-group

A quick example :

In the tutorial above we'll use the selector provided, but instead we'll add the pseudo-element ::before to place our content before the username.

Code:
a span[style="color:#990099"] strong:before {
  content:'[Mod]';
}

The code above will place the texts [Mod] before members of the Support Moderators. You must change #990099 to the color of your group, the tutorial will explain. Wink
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: Username Prefix based on groups

Post by Jophy June 27th 2014, 5:55 pm

Oh right, my bad, I forgot we have a tutorial for that, it's provided by Ange's post. Sorry for the trouble.
Jophy
Jophy
ForumGuru

Male Posts : 17924
Reputation : 836
Language : English
Location : Somewhere

Back to top Go down

Solved Re: Username Prefix based on groups

Post by stelios102 June 28th 2014, 1:51 am

Thank you very much! The guide solved it for me. Updating the icon now.
avatar
stelios102
New Member

Posts : 7
Reputation : 1
Language : English

http://naga.motionsforum.com

Back to top Go down

Solved Re: Username Prefix based on groups

Post by Ange Tuteur June 28th 2014, 2:13 am

You're welcome. Wink

Topic locked

Have a good day. Smile
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum