Posts: 66
Threads: 20
Joined: May 2015
2015-08-01, 04:45 PM
(This post was last modified: 2021-07-26, 03:10 PM by User 95587. Edited 1 time in total.)
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!
Posts: 52
Threads: 6
Joined: Mar 2015
Reputation:
1
Oh hai,
it's me: Paradise
but yes,
all you need to do is format it
Posts: 66
Threads: 20
Joined: May 2015
(2015-08-01, 05:04 PM)CallingChain Wrote: Oh hai,
it's me: Paradise
but yes,
all you need to do is format it 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.
Posts: 52
Threads: 6
Joined: Mar 2015
Reputation:
1
(2015-08-01, 05:07 PM)xunofar Wrote: (2015-08-01, 05:04 PM)CallingChain Wrote: Oh hai,
it's me: Paradise
but yes,
all you need to do is format it 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);
Posts: 1,062
Threads: 24
Joined: Jun 2011
Reputation:
69
2015-08-01, 05:18 PM
(This post was last modified: 2015-08-01, 05:18 PM by Ad Bakker.)
(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
Regards, Ad Bakker (NL)
Posts: 66
Threads: 20
Joined: May 2015
(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.
Posts: 1,062
Threads: 24
Joined: Jun 2011
Reputation:
69
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.
Regards, Ad Bakker (NL)
Posts: 66
Threads: 20
Joined: May 2015
(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.
Posts: 1,062
Threads: 24
Joined: Jun 2011
Reputation:
69
(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.
Regards, Ad Bakker (NL)
Posts: 66
Threads: 20
Joined: May 2015
(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.
|