SimplePortal

Customization => Blocks and Modifications => Block Requests => Topic started by: noelleon69 on May 28, 2009, 03:08:47 PM

Title: Enhancing Forum Staff block
Post by: noelleon69 on May 28, 2009, 03:08:47 PM
Currently the forum staff block only shows the admins and moderators.

I would like to have a block customised to show additional member groups. In my case I want a block to show the admins as well as the committee members so members know who are the people involved in my club.

How can I do this? Could anyone tell me the code and which type of custom block to use (bbc, php or html?)?
Title: Re: Enhancing Forum Staff block
Post by: ccbtimewiz on May 28, 2009, 04:14:05 PM
Hmmm..

Open SPortal.php

Find:
Code: [Select]
$all_staff = array_unique($all_staff);
Replace with;
Code: [Select]
$all_staff = array_unique($all_staff);

foreach (array(#, #, #, #) as $new_group)
$all_staff[] = $new_group;

And replace each # with a new group ID.
Title: Re: Enhancing Forum Staff block
Post by: noelleon69 on May 28, 2009, 04:31:44 PM
You meant SPortal1-1.php in the sources folder right?

It gives me this error after doing the edit:

Parse error: syntax error, unexpected ';', expecting ')' in .../forum/Sources/SPortal1-1.php
Title: Re: Enhancing Forum Staff block
Post by: ccbtimewiz on May 28, 2009, 05:20:16 PM
Could you attach the file please?
Title: Re: Enhancing Forum Staff block
Post by: noelleon69 on May 28, 2009, 05:30:10 PM
Here is the file...
Title: Re: Enhancing Forum Staff block
Post by: ccbtimewiz on May 28, 2009, 06:06:24 PM
Try this out.

Make sure to define each group into the array on line 2431.
Title: Re: Enhancing Forum Staff block
Post by: noelleon69 on May 28, 2009, 06:28:22 PM
It is calling the member ID instead of the group ID. For example if I enter 9, instead of listing all members in member group #9, it only shows a single member whose member ID is 9.
Title: Re: Enhancing Forum Staff block
Post by: noelleon69 on June 07, 2009, 03:39:20 AM
Solved... found this that does what I wanted :)

http://simpleportal.net/index.php?topic=2477.msg16358#msg16358
Title: Re: Enhancing Forum Staff block
Post by: ccbtimewiz on June 08, 2009, 10:40:56 AM
Well, if you ever want to add single members, use the code I gave. xD
Title: Re: Enhancing Forum Staff block
Post by: noelleon69 on June 08, 2009, 11:11:24 AM
Yes that code would be perfect for that requirement :)
SimplePortal 2.3.8 © 2008-2024, SimplePortal