SimplePortal

Customization => Blocks and Modifications => Mod Requests => Topic started by: ScottyBoy on May 29, 2010, 05:47:31 PM

Title: Add Group To Staff List Block
Post by: ScottyBoy on May 29, 2010, 05:47:31 PM
How can I add the users of another group to the Staff List Block? I've already located the sp_staff() function in PortalBlocks.php, but I'm not sure what I need to add to it.
Title: Re: Add Group To Staff List Block
Post by: grafitus on May 29, 2010, 06:42:00 PM
The easiest way right now is this:
Open ./Souces/PortalBlocks.php file.
Code: (Find) [Select]
$all_staff = array_merge($local_mods, $global_mods, $admins);
Code: (Replace) [Select]
$all_staff = array_merge(array(288, 5, 4435), array(9, 42, 44), $local_mods, $global_mods, $admins);array(288, 5, 4435) and array(9, 42, 44) are two distinct groups. 288, 5, 4435 and 9, 42, 44 numbers of group members their IDs.
Title: Re: Add Group To Staff List Block
Post by: nev3r on November 27, 2010, 08:24:11 PM
Can please somebody tell more about it?
first number is user id, second group id, and third is?
Title: Re: Add Group To Staff List Block
Post by: Nathaniel on December 01, 2010, 01:05:09 AM
"array(288, 5, 4435) and array(9, 42, 44) are two distinct groups. 288, 5, 4435 and 9, 42, 44 numbers of group members their IDs."

Each of the numbers is a user id.
Title: Re: Add Group To Staff List Block
Post by: nev3r on December 01, 2010, 12:00:34 PM
Thank you for the answer.

I have few question that bothering me:)
Why do i need to put usedID in different groups?
And is there any way to just put group ID instead of adding each user manually?
Title: Re: Add Group To Staff List Block
Post by: AngelinaBelle on December 01, 2010, 12:52:09 PM
Yes.  You can do that.  You can see the example of how the block is set up.
Then, you can decide on which user group to add to the staff list, and how to set up the prefix (which is used for ordering the users).
 
It would be a good exercise for you to learn a little about customizing with php.
SimplePortal 2.3.8 © 2008-2024, SimplePortal