Admin and mod names in color

Started on the old forum in January 2010 · view the original in the archive · old links redirect here

4 replies · 682 views · started 16 years ago · 1 min read

4 participants
wap_king Developer · 126 posts #1

how to make administrator and moderator names in colors?

Vayne Developer · 106 posts #2

select permisionons.. if $perm>0

Nous Ne Dansos Pas, Nous Sommes Le Danse.!

GiLL Senior · 356 posts #3

you ca use even css for that like

.owner {color: #F07080;
 font-weight: bold; }

.admin {color: #38ACEC;
 font-weight: bold; }

left wap stuff

wap_king Developer · 126 posts #4

yeah i tried css but not like tht

djlee Developer · 224 posts #5

heres what i do on my site (you'll need to modify it to suit yours)

function

function get_user_class_color($class) {
 switch($class) {
  case 10: $color = "owner"; break;
  case 5: $color = "moderator"; break; 
  default: $color = "member";
  }
 }

css

.owner { color: #ff0000; }
.moderator { color: #0000ff; }
.member { color: #000000; }

usage

echo "You are viewing <span class='".get_user_class_color($user['class'])."'>".$user['username']."</span>'s profile!";

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close