Forumlar / Cotonti / General / Colored username?

young mone
#1 2012-03-21 22:04

How would i be able to have users in a rank have colored usernames? 

[url=<a href="">http://pspw.co.cc]All</a> your game needs and more[/url]
Dyllon
#2 2012-03-22 02:48

I don't know what your intentions are in terms of changing the colors, but if you are familiar with PHP this is the function you would have to alter:

system/functions.php Line 1710

function cot_build_user($id, $user, $extra_attrs = '')
{
	global $cfg;

	if (!$id)
	{
		return empty($user) ? '' : $user;
	}
	else
	{
		return empty($user) ? '?' : cot_rc_link(cot_url('users', 'm=details&id='.$id.'&u='.$user), $user, $extra_attrs);
	}
}
We are what we repeatedly do. Excellence then, is not an act, but a habit.
pieter
#3 2012-03-22 07:18

Or you can do it with CSS

Make a class for each color. And use the rankname in it.

rankname1_color
rankname2_color
.....

And add the class to the username with the rankname variable init. (class={rankname}_color)

I don't know the tag to display the rankname (I used above {rankname} as example)

... can we help you ...
Kingsley
#4 2012-03-22 15:19

{blabla_USERMAINGRP} blabla depending on what tpl it is used..

 

@ dyllon

how's the social plugin coming along?

Dyllon
#5 2012-03-22 15:49

Its on the back burner for now. Im a little too busy with school and work at the moment.

We are what we repeatedly do. Excellence then, is not an act, but a habit.