MyBB Community Forums

Full Version: Displaying name on Page
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello, now currently i'm setting up a ShowGroups page that shows all of a forums usergroups. A big problem im coming across is the names look like this:

[img][/img]
(LOOK AT THE LEADER NAME)

How would I go about making it so that the leader name changes as soon as the person changes their name or name style, and looks like this:

[img][/img]

If you notice the name style in this one, it has my display group color and style.
Is there a way to display a users name with their group style using their UID? Thanks!
Oh hai,
it's me: Paradise Big Grin

but yes,
all you need to do is format it Smile
(2015-08-01, 05:04 PM)CallingChain Wrote: [ -> ]Oh hai,
it's me: Paradise Big Grin

but yes,
all you need to do is format it Smile
Hai paradise.
My question is though how would you set it to display the name of a certain person using their UID.
So if they were to change their name or display group it would automatically change it.
I know about formatting it, but I don't want to have to do it manually each time someone changes their name.
(2015-08-01, 05:07 PM)xunofar Wrote: [ -> ]
(2015-08-01, 05:04 PM)CallingChain Wrote: [ -> ]Oh hai,
it's me: Paradise Big Grin

but yes,
all you need to do is format it Smile
Hai paradise.
My question is though how would you set it to display the name of a certain person using their UID.
So if they were to change their name or display group it would automatically change it.
I know about formatting it, but I don't want to have to do it manually each time someone changes their name.

I mean,
play around with this code.

Basically edit it where you need it for show groups:
 // Format the welcome back message
 $welcome_back_user = format_name($mybb->user['username'], $mybb->user['usergroup'], $mybb->user['displaygroup']);
 $lang->welcome_back = $lang->sprintf($lang->welcome_back, build_profile_link($welcome_back_user, $mybb->user['uid']), $lastvisit);
(2015-08-01, 04:45 PM)xunofar Wrote: [ -> ]Is there a way to display a users name with their group style using their UID? Thanks!

I fear I do not understand the question.

For every user you can set a display user group in:

AdminCP -> Users & Groups -> Users -> Options (for a member) -> Profile & Settings -> tab Profile -> Display User Group
(2015-08-01, 05:18 PM)Ad Bakker Wrote: [ -> ]
(2015-08-01, 04:45 PM)xunofar Wrote: [ -> ]Is there a way to display a users name with their group style using their UID? Thanks!

I fear I do not understand the question.

For every user you can set a display user group in:

AdminCP -> Users & Groups -> Users -> Options (for a member) -> Profile & Settings -> tab Profile -> Display User Group

Yes, this is a page that shows the usergroups on the forums. For each groups theres a leader.
I want the area that says leader to show the name, and the name effects of the current leader.
And when you make a new group named "Group Leaders". You can set the Username Style for this group, and set the display group of all group leaders to this Group Leaders usergroup.
(2015-08-01, 05:30 PM)Ad Bakker Wrote: [ -> ]And when you make a new group named "Group Leaders". You can set the Username Style for this group, and set the display group of all group leaders to this Group Leaders usergroup.
I'll try to show you an example, check out the page
http://silentforums.tk/showgroups.php

On that page you see "Leaders". Right now I have to set the names using this
<a href="http://silentforums.tk/member.php?action=profile&uid=1"><span style="color: #00c5cd; font-weight: bold; font-style: italic; text-shadow: 2px 2px 2px #000000; ">SilentThief</span></a>

But I want it to be formatted by the users UID so that I don't have to change the format each time.
(2015-08-01, 05:36 PM)xunofar Wrote: [ -> ]I want it to be formatted by the users UID

Yes, but how/where do you want to define which format belongs to a certain UID.
(2015-08-01, 05:47 PM)Ad Bakker Wrote: [ -> ]
(2015-08-01, 05:36 PM)xunofar Wrote: [ -> ]I want it to be formatted by the users UID

Yes, but how/where do you want to define which format belongs to a certain UID.
Where it says "Silent Thief" I want it to have the name and group effects that his groups have. Right now im manually formating it. But lets say silent changed his name, it would stay "SilentThief" on the page until I edited the template and changed it. What I want it to do it use SilentThief's UID to automatically update his name once it is changed.
Pages: 1 2