individual coloured user names (Design/Themes)

by fresh, Monday, November 16, 2009, 11:34 (5272 days ago)

is there any idea how the usernames can be coloured individually
like it was realized in older parsimony forums?

individual coloured user names

by Auge, Monday, November 16, 2009, 16:57 (5272 days ago) @ fresh

Hello

is there any idea how the usernames can be coloured individually
like it was realized in older parsimony forums?

As first: I don't know the Parsimony forums. So that is a bit of speculation.

You speak about colouring of names, depending on the user's role?

Like in the example?

  • admins: red
  • moderators: green
  • registered users: blue
  • unregistrered ones: black

For admins and moderators it is easy. Theses roles are notated in the attributes class and title in a span around the users name.

Example 1 (sticky thread for localizations, opening posting):

<li><a class="thread-sticky" href="index.php?id=4157">Localization / translations</a> - <strong><span class="admin" title="Administrator">Alex</span></strong>, 2009-07-14 ...</li>

Example 2 (sticky thread "sandbox", opening posting):

<li><a class="thread-sticky" href="index.php?id=2677">Test Thread (Sandbox)</a> - <strong><span class="mod" title="Moderator">Alfie</span></strong>, 2008-05-07 ...</li>

The interesting part is the class in the span-element for the name. Create data for the classes admin and mod in the CSS file.

/* for example */
span.admin { color:#d00; }
span.mod { color:#0d2; }

If you want to incorporate the registered users too, you have to find the location, where the script asks the database for the names of admins and moderators. There you have to ask for registered users additionally. Then you must find the part, where these data are included into the HTML source code. This part should incorporate the users with role "registered user" and mark them with an own class. As last you have to set up data for the class in the CSS file. That's it.

Tschö, Auge

individual coloured user names

by fresh, Thursday, November 19, 2009, 16:17 (5269 days ago) @ Auge

thanks for your explanations.
it's quite what i'm looking for. a good implementation in parsimony was, that every registered user had the possibility of choosing his own color.
so i'll try with this hint what i can do.

individual coloured user names

by Auge, Sunday, November 22, 2009, 17:57 (5266 days ago) @ fresh

Hallo

it's quite what i'm looking for. a good implementation in parsimony was, that every registered user had the possibility of choosing his own color.

That's to much for a software wich has the word "little" in it's name.

so i'll try with this hint what i can do.

Use the given class names. This is a easy to use method. You only have to know how to set the color for font via CSS.

Maybe Alex decide to give the user more options to handle te view of the forum. Then it could be possible to name some members as "friends" or something like this. Marked with a extra class i.e. you can give them a new color.

Tschö, Auge

individual coloured user names

by Abax, Monday, November 23, 2009, 10:19 (5265 days ago) @ Auge

In previous versions – I don't exactly remember the version number – it was possible to select a different colour for categories that were avaialble for registered users. The CSS files still have traces of this, but it doesn't work anymore. Seems like the span is removed from the code. Is there an easy way to label the categories for reg users?

RSS Feed of thread