Is there a function to get the actual username color?

by AndresXZ09 - 13-06-2015, 01:13 AM
Closed Account
Posts:
1,383
Joined:
Jan 2015
Likes:
124
Credits:
1,356
Reputation:
30
3 Years of Service
#1
OP
Posted: 13-06-2015, 01:13 AM
I want to know if there is a function to get the actual username color of a user, not the group, or the display group, but the actual username color being displayed.

Thank you Smile
oldfag
Posts:
5,769
Joined:
Jan 2015
Likes:
1,578
Credits:
17,410
Reputation:
239
3 Years of Service
#2
Posted: 13-06-2015, 01:15 AM
Code:
{$formattedname}

I'm not sure.
Send me a message for help. (Read the help docs first)
Steam Wishlist - Anime Watchlist
Closed Account
Posts:
1,383
Joined:
Jan 2015
Likes:
124
Credits:
1,356
Reputation:
30
3 Years of Service
#3
OP
Posted: 13-06-2015, 01:17 AM
It works only on templates, I'm trying to code something in PHP Tongue
oldfag
Posts:
5,769
Joined:
Jan 2015
Likes:
1,578
Credits:
17,410
Reputation:
239
3 Years of Service
#4
Posted: 13-06-2015, 01:22 AM
(13-06-2015, 01:17 AM)AndresXZ09 Wrote: It works only on templates, I'm trying to code something in PHP Tongue

No clue what you mean.
Send me a message for help. (Read the help docs first)
Steam Wishlist - Anime Watchlist
We are!
Posts:
1,044
Joined:
Jan 2015
Likes:
108
Credits:
1,954
Reputation:
25
3 Years of Service
#5
Posted: 13-06-2015, 01:36 AM (This post was last modified: 13-06-2015, 01:36 AM by Akay.)
PHP Code:
$userquery $db->query("
        SELECT u.uid, u.username
        FROM "
.TABLE_PREFIX."users u
    "
);


if (
$db->num_rows($userquery) > 0)
{
    
$display "";
    while (
$users $db->fetch_array($userquery))
    {
                            
$users['username'] = format_name($users['username']);
                            
$users['profilelink'] = get_profile_link($users['uid']);

$display .= '<span><strong>'build_profile_link($users['username'], $users['uid']). '</strong></span></a></strong></span>'

}

?>

Something like that, too tired atm
linkzy
13-06-2015, 01:37 AM
Closed Account
Posts:
1,383
Joined:
Jan 2015
Likes:
124
Credits:
1,356
Reputation:
30
3 Years of Service
#6
OP
Posted: 13-06-2015, 01:57 AM
I'm retarded, it was

PHP Code:
format_name($post['username'], $post['usergroup'], $post['displaygroup']); 

Thank you guys.
We are!
Posts:
1,044
Joined:
Jan 2015
Likes:
108
Credits:
1,954
Reputation:
25
3 Years of Service
#7
Posted: 13-06-2015, 01:58 AM
(13-06-2015, 01:57 AM)AndresXZ09 Wrote: I'm retarded, it was

PHP Code:
format_name($post['username'], $post['usergroup'], $post['displaygroup']); 

Thank you guys.

Close enough, i guess.
Fulltime Member
Posts:
1,134
Joined:
Apr 2015
Likes:
51
Credits:
117
Reputation:
37
2 Years of Service
#8
Posted: 13-06-2015, 02:01 AM
(13-06-2015, 01:58 AM)akay Wrote:
(13-06-2015, 01:57 AM)AndresXZ09 Wrote: I'm retarded, it was


PHP Code:
format_name($post['username'], $post['usergroup'], $post['displaygroup']); 

Thank you guys.

Close enough, i guess.

There is also a plugin which does it automatically :noh:
We are!
Posts:
1,044
Joined:
Jan 2015
Likes:
108
Credits:
1,954
Reputation:
25
3 Years of Service
#9
Posted: 13-06-2015, 02:02 AM
(13-06-2015, 02:01 AM)Tropical Wrote:
(13-06-2015, 01:58 AM)akay Wrote:
(13-06-2015, 01:57 AM)AndresXZ09 Wrote: I'm retarded, it was


PHP Code:
format_name($post['username'], $post['usergroup'], $post['displaygroup']); 

Thank you guys.

Close enough, i guess.

There is also a plugin which does it automatically :noh:

He didn't mean Mention stuff, if that's what you're thinking of.
Fulltime Member
Posts:
1,134
Joined:
Apr 2015
Likes:
51
Credits:
117
Reputation:
37
2 Years of Service
#10
Posted: 13-06-2015, 02:05 AM
(13-06-2015, 02:02 AM)akay Wrote:
(13-06-2015, 02:01 AM)Tropical Wrote:
(13-06-2015, 01:58 AM)akay Wrote:
(13-06-2015, 01:57 AM)AndresXZ09 Wrote: I'm retarded, it was



PHP Code:
format_name($post['username'], $post['usergroup'], $post['displaygroup']); 

Thank you guys.

Close enough, i guess.

There is also a plugin which does it automatically  :noh:

He didn't mean Mention stuff, if that's what you're thinking of.

Oh, whoops :noh:
I thought he did.

My bad :yus:
The last reply on this thread is older than a month. Please do not unnecessarily bump it.
Register an account or login to reply
Create an account
Create a free account today and start posting right away. It only takes a few seconds.
Login
Log into an existing account.
1 Guest(s)