New messages Members Forum rules Search
  • Page 1 of 1
  • 1
Forum moderator: kostova  
uCoz Support Forum by uCozers » uCoz » Site Users » User Colors (sml[answered])
User Colors
ScottyBoyDate: Thursday, 2009 June 25, 6:18 AM | Message # 1
Font size: A | A |
Major
Group: uCozer
Message: 88
[ ]
Offline
How do I change the user name colors of specific user groups? I noticed that the Admins here have red user names, and I thought that was pretty cool.

Thanks guys.


 
HetorDate: Thursday, 2009 June 25, 12:34 PM | Message # 2
Font size: A | A |
Sergeant
Group: Banned
Message: 41
[ ]
Offline
Find something like this in your CSS
Code
/* User Group Marks */
a.groupModer:link,a.groupModer:visited,a.groupModer:hover {color:yellow;}
a.groupAdmin:link,a.groupAdmin:visited,a.groupAdmin:hover {color:pink;}
a.groupVerify:link,a.groupVerify:visited,a.groupVerify:hover {color:#99CCFF;}
/* ---------------- */
And edit it.




Edited ByHetor - Thursday, 2009 June 25, 12:34 PM
 
jackassDate: Thursday, 2009 June 25, 4:13 PM | Message # 3
Font size: A | A |
Major general
Group: Administrator
Message: 433
[ ]
Offline
ScottyBoy, did you mean in the forum posts? Or in online user list?

 
ScottyBoyDate: Friday, 2009 June 26, 0:01 AM | Message # 4
Font size: A | A |
Major
Group: uCozer
Message: 88
[ ]
Offline
Forum posts. I already changed the online user list.

 
HetorDate: Friday, 2009 June 26, 0:42 AM | Message # 5
Font size: A | A |
Sergeant
Group: Banned
Message: 41
[ ]
Offline
Try using <?if?> operators. Eg.

Code
<?if($GROUP_ID$)=4?><span style="color:red">$USERNAME$</span><?endif?><?if($GROUP_ID$)=3?><span style="color:yellow">$USERNAME$</span><?endif?>


 
jackassDate: Friday, 2009 June 26, 1:11 AM | Message # 6
Font size: A | A |
Major general
Group: Administrator
Message: 433
[ ]
Offline
Hetor, wrong answer!

Go to Customize Design -> Forum -> Appearance of entries and find this

Code
<tr><td width="23%" class="postTdTop" align="center"><a class="postUser" href="javascript://" onClick="emoticon('[b]$USERNAME$[/b],');return false;">$USERNAME$</a></td>

And replace with
Code
<tr><td width="23%" class="postTdTop" align="center"><a class="postUser$GROUP_ID$" href="javascript://" onClick="emoticon('[b]$USERNAME$[/b],');return false;"><span class="forum_nik$UID$">$USERNAME$</span></a></td>

Then go to your CSS style sheet and add this
Code
a.postUser1 {color:#000000;} – Group color for group with ID 1
a.postUser2 {color:#00FF00;} - Group color for group with ID 2
a.postUser3 {color:#0000FF;} - Group color for group with ID 3
a.postUser4 {color:#FF0000;} - Group color for group with ID 4

If you want to add color for individual user, than add to your CSS this

Code
.forum_nik1 {color:#F6F6F6;} – username color of the user with ID=1
.forum_nik6 {color:#F7F7F7;} - username color of the user with ID=6
.forum_nik7 {color:#F9F9F9;} - username color of the user with ID=7
.forum_nik4 {color:#A6A6A6;} - username color of the user with ID=4

If you want usernames in bold just replace this

{color:#A6A6A6;}

With this

{color:#556bb4;font-weight:bold;}

This is correct answer Hetor!


 
ScottyBoyDate: Friday, 2009 June 26, 1:25 AM | Message # 7
Font size: A | A |
Major
Group: uCozer
Message: 88
[ ]
Offline
Where do I put the CSS codes? Does it matter?

 
HetorDate: Friday, 2009 June 26, 10:11 AM | Message # 8
Font size: A | A |
Sergeant
Group: Banned
Message: 41
[ ]
Offline
Quote (jackass)
Hetor, wrong answer!

We are not playing Trivia. My answer is not wrong, it's just another way that you didn't know about.

As for CSS, Customize desing > Style Sheet CSS.




Edited ByHetor - Friday, 2009 June 26, 11:34 AM
 
Z10Date: Friday, 2009 June 26, 10:20 PM | Message # 9
Font size: A | A |
Major
Group: uCozer
Message: 100
[ ]
Offline
I like Hetor's Idea more it's the one i used on my site.

"When life gives you lemons, make orange juice. Sit back, relax, and let the world wonder how you did it."
 
jackassDate: Friday, 2009 June 26, 10:40 PM | Message # 10
Font size: A | A |
Major general
Group: Administrator
Message: 433
[ ]
Offline
Hetor

1. I can say that you didn't explain it so the user understand what to replace and where

2. I can say that I didn't read all post, some think like you said in one post!

You don't like when some one do like you did right?

Quote (Hetor)
As for CSS, Customize desing > Style Sheet CSS.

Hetor, ScottyBoy, understand that! He means where in the template?

ScottyBoy, I suggest you to put the code after

Code
/* User Group Marks */
a.groupModer:link,a.groupModer:visited,a.groupModer:hover {color:yellow;}
a.groupAdmin:link,a.groupAdmin:visited,a.groupAdmin:hover {color:pink;}
a.groupVerify:link,a.groupVerify:visited,a.groupVerify:hover {color:#99CCFF;}
/* ---------------- */

So when you need it again you can easy find it smile


P.S.

This method

Code
<?if($GROUP_ID$)=4?><span style="color:red">$USERNAME$</span><?endif?><?if($GROUP_ID$)=3?><span style="color:yellow">$USERNAME$</span><?endif?>

Will need to edit template for forum much more than in this method!
And it's normal if user edit color and other stuff in CSS, because CSS is for this things!
CSS (Cascading Style Sheets)


 
ScottyBoyDate: Saturday, 2009 June 27, 2:12 AM | Message # 11
Font size: A | A |
Major
Group: uCozer
Message: 88
[ ]
Offline
I cant get ether one to work. Jackass's way looks easier in my opinion, but when I put in in my CSS style sheet, it only partially worked. Only the top line of the following code is effective. For instance, if I put the last line of code on the top, it would only change Admin color, but if I just pasted the code as following, it only change Users color.

Code
a.postUser1 {color:#000000;} – Group color for group with ID 1
a.postUser2 {color:#00FF00;} - Group color for group with ID 2
a.postUser3 {color:#0000FF;} - Group color for group with ID 3
a.postUser4 {color:#FF0000;} - Group color for group with ID 4

I'm not sure what I did wrong but it's not working for me.

Anyway, I tried Hector's code too, but I wasn't sure what to do with it. Where do I put it, and what parts do I have to change to make it work for the right group?


 
jackassDate: Saturday, 2009 June 27, 3:13 PM | Message # 12
Font size: A | A |
Major general
Group: Administrator
Message: 433
[ ]
Offline
ScottyBoy, see how it look in this forum

In CSS:

Code
/* User Group Marks */
a.groupModer:link,a.groupModer:visited,a.groupModer:hover {color:blue;}
a.groupAdmin:link,a.groupAdmin:visited,a.groupAdmin:hover {color:red;}
a.groupVerify:link,a.groupVerify:visited,a.groupVerify:hover {color:green;}
/* ---------------- */

/* User Group Colors in Posts*/

a.postUser2 {color:green;}
a.postUser3 {color:blue;}
a.postUser4 {color:red;}
/* ---------------- */

Customize Design -> Forum -> Appearance of entries

Code
<table class="postTable" border="0" cellpadding="2" cellspacing="1" width="100%">
<tbody>

<tr><td width="23%" class="postTdTop" align="center"><a class="postUser$GROUP_ID$" href="javascript://" onClick="emoticon('[b]$USERNAME$[/b],');return false;"><span class="forum_nik$UID$">$USERNAME$</span></a></td>

<td class="postTdTop"><?if($AWARDS_DO_URL$ && $USER_LOGGED_IN$ && $CUR_USER_ID$!=$UID$)?><div style="float: right;"><a href="javascript://" onclick="new _uWnd('AwD','Give award',380,200,{autosize:1,maxh:300},{url:'/index/55-$UID$-28-forum-$FID$_$TID$_$ID$_16_$TIMESTAMP$'}); return false;"><img src="http://s102.ucoz.net/img/icon/thumbu.png" title="Good post" border="0" width="13"></a> <a href="javascript://" onclick="new _uWnd('AwD','Give award',380,200,{autosize:1,maxh:300},{url:'/index/55-$UID$-47-forum-$FID$_$TID$_$ID$_16_$TIMESTAMP$'}); return false;"><img src="http://s102.ucoz.net/img/icon/thumbd.png" title="Bad post" border="0" width="13"></a></div><?endif?>Date: $WDAY$, $DATE$, $TIME$ | Message # $NUMBER$</td></tr>
<tr><td class="postTdInfo" align="center" valign="top">
<?if($AVATAR_URL$)?><img title="$USERNAME$" class="userAvatar" src="$AVATAR_URL$" border="0"><?endif?>
<?if($USER_TITLE$)?><br><div align="left">$USER_TITLE$<?else?><div class="postRankName">$USER_RANK_NAME$</div><?endif?>
<?if($GROUP_ICON$)?><br>$GROUP_ICON$<?else?><div class="postRankIco">$USER_RANK_ICON$</div><?endif?>
<?if($GROUP_NAME$)?><br>Group: $GROUP_NAME$<?endif?>
<?if($POSTS$)?><br>Messages: <span="unp">$POSTS$</span="unp"></div><?endif?>

In 2. code is not all code!

Check if it looks the same?
Or try our code to paste in


 
ScottyBoyDate: Sunday, 2009 June 28, 1:36 AM | Message # 13
Font size: A | A |
Major
Group: uCozer
Message: 88
[ ]
Offline
Thanks, man! it works now. biggrin

 
GuttasDate: Sunday, 2012 April 01, 3:49 PM | Message # 14
Font size: A | A |
Private
Group: User
Message: 1
[ ]
Offline
I need the same for tag board, what should i do? i want that users color be blue, admins - green, mods - red!, what should i do?

Added (2012 April 01, 3:48 PM)
---------------------------------------------
i have the same mini chat like hier, but i want colored users names...

Added (2012 April 01, 3:49 PM)
---------------------------------------------
check this out: www.tvkinas.tk

 
{TDW}NaCkDate: Friday, 2013 July 26, 1:30 AM | Message # 15
Font size: A | A |
Private
Group: User
Message: 1
[ ]
Offline
I did a bad thing and I change the names of User Groups.. Now I don't remember the previous name of each to change their colors.. Any suggestion about that?

Thanks in advance
 
uCoz Support Forum by uCozers » uCoz » Site Users » User Colors (sml[answered])
  • Page 1 of 1
  • 1
Search:


Copyrights uCozers 2009 - 2024 To TOP
Refresh Smileys Manager