Sorting moderator forums in memberlist_team.html

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Post Reply
MB_MathemaTeX
Registered User
Posts: 53
Joined: Wed Feb 15, 2006 10:52 am
Contact:

Sorting moderator forums in memberlist_team.html

Post by MB_MathemaTeX »

Hello, I trying to understand the display order of moderator forums in memberlist_team.html. I expected the display order to follow the homepage forums, but it doesn't seem to be. Is it possible to adjust this behavior ?

the code seems to be based on {group.user.FORUMS} but I can't seem to figure out what exactly matches this variable.
Last edited by HiFiKabin on Sat May 15, 2021 4:23 pm, edited 1 time in total.
Reason: Moved to Custom Coding
MB :: MathemaTeX ::
User avatar
AleSSaNDRo
Registered User
Posts: 135
Joined: Thu Mar 18, 2004 5:05 pm
Location: Milano
Contact:

Re: Sorting moderator forums in memberlist_team.html

Post by AleSSaNDRo »

Hi! From what I know, the list of staff users is sorted alphabetically for each individual group.
WebMaster of MondoWeb.net - Free hosting phpBB forum
I'm 🇮🇹 italian! :) Sorry for my bad english :oops:
MB_MathemaTeX
Registered User
Posts: 53
Joined: Wed Feb 15, 2006 10:52 am
Contact:

Re: Sorting moderator forums in memberlist_team.html

Post by MB_MathemaTeX »

Yes, but I was talking about the list of forums for each moderator user. The ranking seems a bit random.
MB :: MathemaTeX ::
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Sorting moderator forums in memberlist_team.html

Post by david63 »

MB_MathemaTeX wrote: Fri May 14, 2021 10:44 am he display order of moderator forums in memberlist_team.html
From looking at the code it would appear that the forums are in forum_id order.
MB_MathemaTeX wrote: Fri May 14, 2021 10:44 am Is it possible to adjust this behavior
Not without changing core code - and it would not be an easy thing to do.
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
MB_MathemaTeX
Registered User
Posts: 53
Joined: Wed Feb 15, 2006 10:52 am
Contact:

Re: Sorting moderator forums in memberlist_team.html

Post by MB_MathemaTeX »

david63 wrote: Fri May 14, 2021 12:47 pm From looking at the code it would appear that the forums are in forum_id order.
I did not find the part of the code which took care of this classification, could you indicate it to me ?
In my experience, the ranking made for one user is not independent of other users of the team ... It's note very clear.

Here are some examples from my board.

Code: Select all

Moderator forums for user A : { forum_id = 18 ; forum_id = 19 } (ok)
Moderator forums for user B : { forum_id = 34 ; forum_id = 44 } (ok)
Moderator forums for user C : { forum_id = 44 ; forum_id = 6  } (strange)
If I add users D and E, this is what I get.

Code: Select all

Moderator forums for user A : { forum_id = 18 ; forum_id = 19 } (ok)
Moderator forums for user B : { forum_id = 44 ; forum_id = 34 } (strange)
Moderator forums for user C : { forum_id = 6  ; forum_id = 44 } (ok)
Moderator forums for user D : { forum_id = 6  ; forum_id = 44 } (ok)
Moderator forums for user E : { forum_id = 6  ; forum_id = 44 } (ok)
Last edited by MB_MathemaTeX on Fri May 14, 2021 2:44 pm, edited 2 times in total.
MB :: MathemaTeX ::
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Sorting moderator forums in memberlist_team.html

Post by david63 »

MB_MathemaTeX wrote: Fri May 14, 2021 1:19 pm could you indicate it to me
memberlist.php around line 244
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
MB_MathemaTeX
Registered User
Posts: 53
Joined: Wed Feb 15, 2006 10:52 am
Contact:

Re: Sorting moderator forums in memberlist_team.html

Post by MB_MathemaTeX »

Thanks, I just look at the code.

Code: Select all

$perm_ary = $auth->acl_get_list($user_ids, array('m_'), false);
Returning for me this list of forum ids : { 0 ; 34 ; 44 ; 6 ; 18 ; 19 }.

It looks like the command starts by going through the list of all users in order of user_ids. The forum_ids are therefore added as soon as we come across a moderator, which explains the ranking.
MB :: MathemaTeX ::
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: Sorting moderator forums in memberlist_team.html

Post by 3Di »

The list (query) is ordered alphabetically in ASCending order.
'ORDER_BY' => 'u.username_clean ASC',
Then the forum IDs are calculated based on the array of user IDs
$user_ids[] = (int) $row['user_id'];
then
$user_ids = array_unique($user_ids);
then
$perm_ary = $auth->acl_get_list($user_ids, array('m_'), false);

You can use this event to modify the query used to get the users for the team page
core.memberlist_team_modify_query

If you can not make an extension you should ask in the Custom Coding Forum.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
MB_MathemaTeX
Registered User
Posts: 53
Joined: Wed Feb 15, 2006 10:52 am
Contact:

Re: Sorting moderator forums in memberlist_team.html

Post by MB_MathemaTeX »

Thanks, I will try to do something.
The goal was to find the same order as the one shown on the board, so I'm not sure this can be done just by changing the user query.
MB :: MathemaTeX ::
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Sorting moderator forums in memberlist_team.html

Post by david63 »

MB_MathemaTeX wrote: Fri May 14, 2021 4:13 pm I'm not sure this can be done just by changing the user query
It probably can but unless you understand the structure of the forums table then it will not be easy, and even if you do it will not be easy
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
MB_MathemaTeX
Registered User
Posts: 53
Joined: Wed Feb 15, 2006 10:52 am
Contact:

Re: Sorting moderator forums in memberlist_team.html

Post by MB_MathemaTeX »

It is not a big issue, so I will try when I have more time. Thx.
MB :: MathemaTeX ::
Post Reply

Return to “phpBB Custom Coding”