SimplePortal
Customization => Blocks and Modifications => Block Requests => Topic started by: exa on November 12, 2015, 03:54:49 AM
-
Hello! I would like to have a block that's identical to Who's Online but instead of just showing namnes, i want the names to be split into groups!
This is an example i took from a swedish forum:
(http://i.imgur.com/5KR0Kue.png)
So basiclly i want it to be like
Owner:
Name1
Name2
Head-Admin:
Name1
Name2
Admin:
Name1
Name 2
I think you get it ;) So if anyone can help me i would be really happy!
Thanks in advanced
EDIT: I dunno but maybe you need link to my forum, so here it is: http://www.loyalgaming.org
MvH //Exa
-
BUMP, really would like help <3
-
exa,
Welcome to SimplePortal!
Kindly wait for replies, we are all volunteers and we cannot reply every single topic within 5 minutes, especially if it's some customization stuff. Thank you for your understanding.
Regards
-
Hello,
The file you're looking for is /Sources/PortalBlocks.php. The function is called sp_whosOnline
It grabs a list of online members using server-side inclusions here:
$stats = ssi_whosOnline('array');
This function is located in /SSI.php, which uses Subs-MembersOnline.php function getMembersOnlineStats(). Here id_group and group_name are pulled from database request.
The procedure that announces each array entry is here:
foreach ($stats['users_online_today'] as $user)
You can modify the procedure to list in groups by going through the procedure twice. Create an empty array and assign it to a variable, then fill in the array using the procedure and look for $user['id_group'], then you can run the procedure again and list members.
You will need to modify the template a bit as well because SP lists each member using list HTML tags.