Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Is this possible to use different text color for admins/moderators, so all users instantly recognize those users ?
Is this possible to use different text color for admins/moderators, so all users instantly recognize those users ?
Comments
Comment #1
MichelleSure. Just use this: http://api.drupal.org/api/drupal/core--modules--user--user.module/functi...
Michelle
Comment #2
kerios83 CreditAttribution: kerios83 commentedThx, Michelle but I was wondering if it's possible with their post text color (AF). But usernames in a different color is a nice feature to.
Something like:
user
gadkgfjlajgk
user2
gfdsajgfldagda
admin
fkhbakfjaksfa <- different text color
I know I can use wysiwyg for that, but doing it again and again is very frustrating. I would like to have it hardcoded somewhere (it's a nice option for Artesian Forum to do that). So any user with admin/moderator ID would write their text in... red color for example.
Comment #3
MichelleOh, well, you can do it with CSS. The UID of the poster is in the markup. Alternately, you could write a filter for it so you would put, say, [admin]lorem ipsum[/admin] for text you want specially highlighted. That takes coding, though. Doing it with CSS off the UID is easier but then hardcoded to the UID.
Michelle
Comment #4
batigol CreditAttribution: batigol commentedI don't see user ID anywhere... 7.x-2.0-beta2
test topic created:
Comment #5
MichelleMichelle
Comment #6
kerios83 CreditAttribution: kerios83 commentedI think that doing it with the css is easier and you can always change it, whenever you want. Honestly I don't know how http://api.drupal.org/api/drupal/includes--theme.inc/function/theme_user... can help me. Could you give me a little advice ? Thx.
Comment #7
MichelleI suggested that before you clarified that you meant the post color, not the user name.
Michelle
Comment #8
batigol CreditAttribution: batigol commented@Michelle
Could you be more specific ? I presented you the code from 7.x-2.0-beta2 after created a test topic. I'm sorry for being such a pain in the ass but I need this option (different text color). Could you give an example how to achieve this ?
Comment #9
MichelleI gave you the class name you need in #5. Not sure what more you need to know. You can find examples on how to style classes in any CSS primer...
Michelle
Comment #10
batigol CreditAttribution: batigol commentedOhhh thx. I didn't noticed it. Wow everything works fine!
When you try to change text color for admins/moderators class .posted-by-1 have 'inside' some other classes so you styling should looks something like:
Advanced forum style: Naked
When I finish styling this forum I will give a link here so every interested user can watch/ask question about the code.
Now I need to figure out how to style comments like that :)
EDIT:
add
for edited message post text color