Edited as I realised what I originally wrote made absolutely no sense. Let's try again:
I would like to have two seperate groups sorted under the same title in the showteam.php file. For example under "Management" (will probably rename it, but just an example) I want me & the other owner, as well as regular administrators. We have more permissions than a regular admin, obviously, so that's why we want to keep them in two seperate groups.
If I have one group for Management (was called "Owner"), and then another for Administrator... I am unable to set the Administrator group to display as the "Management"-group because that group carries an Owner tag (image).
Is there a workaround for this? Sorry if it's a bit confusing.
My site is:
https://reapersquadron.com
Forums are locked to registered users only, so you can see what I mean under "Roster" instead.
As a very dirty core-file edit, before:
// Now we have all of our user details we can display them.
$grouplist = '';
add:
$usergroups[$x]['user_list'] = array_merge($usergroups[$x]['user_list'],$usergroups[$y]['user_list']);
unset($usergroups[$y]);
Change $x to the ID of the group you want to display the users under, and $y to be the one you want to get rid of. There's 2 occurrences of $x and $y.
This should merge all the users from 2 groups into 1, then remove the one you pulled users from.
(2016-08-09, 11:51 AM)Matt Wrote: [ -> ]As a very dirty core-file edit, before:
// Now we have all of our user details we can display them.
$grouplist = '';
add:
$usergroups[$x]['user_list'] = array_merge($usergroups[$x]['user_list'],$usergroups[$y]['user_list']);
unset($usergroups[$y]);
Change $x to the ID of the group you want to display the users under, and $y to be the one you want to get rid of. There's 2 occurrences of $x and $y.
This should merge all the users from 2 groups into 1, then remove the one you pulled users from.
Much appreciated, Matt! I will test shortly, and if I don't run into any problems and require more assistance, I will mark this as solved.
Thanks, and have a good one!
Hi Matt,
I get this error message now:
Parse error: syntax error, unexpected '4' (T_LNUMBER), expecting variable (T_VARIABLE) or '$' in /home/reape502/public_html/showteam.php on line 114
This is the code:
// Now we have all of our user details we can display them.
$grouplist = '';
$usergroups[$4]['user_list'] = array_merge($usergroups[$4]['user_list'],$usergroups[$3]['user_list']);
unset($usergroups[$3]);
3 is Management Team
4 is Administrator
Sorry, by replace the $x and $y I meant include the $ - try this:
// Now we have all of our user details we can display them.
$grouplist = '';
$usergroups[4]['user_list'] = array_merge($usergroups[4]['user_list'],$usergroups[3]['user_list']);
unset($usergroups[3]);
Disregard this. The reason was that there was currently no Administrators in the Administrator's group.
Case closed, thank you so much, Matt!
Ah, I was about to say, it worked for me locally!
No worries
Make sure to make a note of that code edit for when you come to upgrade your forum next so you can apply it again; don't usually like editing core files but is the easiest way of doing this particular change so
(2016-08-09, 06:05 PM)Matt Wrote: [ -> ]Ah, I was about to say, it worked for me locally! No worries
Make sure to make a note of that code edit for when you come to upgrade your forum next so you can apply it again; don't usually like editing core files but is the easiest way of doing this particular change so
Thanks for the tip! I have saved the code for future purposes, as there's no extra Administrator at this time. (There will be soon, that's why I asked for help)
Have a great day!