"format_name()" function - Printable Version +- MyBB Community Forums (https://community.mybb.com) +-- Forum: Community Archive (https://community.mybb.com/forum-106.html) +--- Forum: Archived Forums (https://community.mybb.com/forum-143.html) +---- Forum: Archived Development and Support (https://community.mybb.com/forum-155.html) +----- Forum: MyBB 1.6 (https://community.mybb.com/forum-138.html) +------ Forum: 1.6 General Support (https://community.mybb.com/forum-127.html) +------ Thread: "format_name()" function (/thread-150569.html) |
"format_name()" function - james15695 - 2014-01-31 Hello, please could you tell me how the format_name function works, and how the variables inside are processed. If you don't know exactly what I'm trying to say, here's an example. $formattedname = format_name($row['username'], $row['usergroup'], $row['displaygroup']); I understand that the above string will grab the user's user group and display group and then format the name accordingly. Is there anyway to add other variables to that, say for example, I wanted to format a username based on a specific color? Many thanks. RE: "format_name()" function - effone - 2014-01-31 This is the function, play with it:
RE: "format_name()" function - james15695 - 2014-01-31 Cheers for the reply. All sorted now, many thanks. RE: "format_name()" function - laie_techie - 2014-01-31 You may want to change the way you format user names based on group (ACP => Users and Groups => Groups => Edit Group => Username Style). I would surround {username} with a span with a CSS class which you can edit for each theme. As an example, my Administrators group is defined as <span class="users_admin">{username}</span> and my theme defines a font color, size, and weight. |