collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 770
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

If you're interested in helping other members with support requests, consider joining the Community Support Helpers group.

Author Topic: Excluding membergroups from blocks  (Read 5432 times)

0 Members and 1 Guest are viewing this topic.

Offline Q-collective

  • Semi Newbie
  • *
  • Posts: 6
  • SMF Version: 2.0.1
  • SP Version: 2.3.3
Excluding membergroups from blocks
« on: February 08, 2012, 03:20:50 AM »
Hey all, my very first topic on this forum ;)

I have SMF 2.0.2 installed and SimplePortal 2.3.3 and I use several blocks on the sidebar. One of these is the "top posters" statistic.

I was wondering if it is at all possible to exclude membergroups from this stat. I can't seem to find this option, if it exists. It may exist in 2.3.4, I don't know.

Thank you :)

Offline Q-collective

  • Semi Newbie
  • *
  • Posts: 6
  • SMF Version: 2.0.1
  • SP Version: 2.3.3
Re: Excluding membergroups from blocks
« Reply #1 on: February 10, 2012, 04:24:45 PM »
So, almost three days on. Does anyone have an idea?

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: Excluding membergroups from blocks
« Reply #2 on: February 10, 2012, 04:52:25 PM »

Every block allows for custom permission settings.
Set it to only allow the membergroups you wish to view it.

Offline Q-collective

  • Semi Newbie
  • *
  • Posts: 6
  • SMF Version: 2.0.1
  • SP Version: 2.3.3
Re: Excluding membergroups from blocks
« Reply #3 on: February 10, 2012, 08:12:23 PM »

Every block allows for custom permission settings.
Set it to only allow the membergroups you wish to view it.
No, I mean the other way around: So only group x, y and z should be listed, but not groups a, b and c.

Is that possible?

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: Excluding membergroups from blocks
« Reply #4 on: February 10, 2012, 10:48:31 PM »

Every block allows for custom permission settings.
Set it to only allow the membergroups you wish to view it.
No, I mean the other way around: So only group x, y and z should be listed, but not groups a, b and c.

Is that possible?

The newer version of SimplePortal (v2.3.4) allows for that type of specific permission setting where you can deny any membergroup(s) from viewing a block including Admin.
The older version you are using will always allow higher ranked groups other than the ones you disallowed to view them.

When you update remember that you have to successfully uninstall that older version (without leaving any parse errors if they occur) and delete it from your package menu. Then you install version 2.3.4.
For the new version there is a drop-down permission setting for blocks that you can set to custom & another menu will appear enabling you to allow groups you want to view the block & deny ones that you want to hide the block from.


Offline Q-collective

  • Semi Newbie
  • *
  • Posts: 6
  • SMF Version: 2.0.1
  • SP Version: 2.3.3
Re: Excluding membergroups from blocks
« Reply #5 on: February 11, 2012, 12:35:12 PM »
The newer version of SimplePortal (v2.3.4) allows for that type of specific permission setting where you can deny any membergroup(s) from viewing a block including Admin.
Maybe I'm not expressing myself clearly, but I'm not talking about viewing a block. I'm talking specifically about the "top posters" module. What I want is to exclude people from this list depending on what usergroup they are in.

Is this possible in 2.3.4?

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: Excluding membergroups from blocks
« Reply #6 on: February 12, 2012, 01:03:37 AM »
Ok my apologies, I understand what you are after now.
This option does not exist & will require a manual edit.

You have 2 options to accomplish this (only use 1).
One is just editing the mysql by adding some logical conditions and the other is using php (still requiring more minor mysql edits).




mysql option:

File: Sources / PortalBlocks.php

find:
Code: [Select]
$request = $smcFunc['db_query']('', '
SELECT
mem.id_member, mem.real_name, COUNT(*) as posts,
mem.avatar, a.id_attach, a.attachment_type, a.filename
FROM {db_prefix}messages AS m
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = m.id_member)
LEFT JOIN {db_prefix}attachments AS a ON (a.id_member = mem.id_member)
WHERE m.poster_time > {int:start_time}
AND m.id_member != 0
GROUP BY mem.id_member
ORDER BY posts DESC
LIMIT {int:limit}',
array(
'start_time' => $start_time,
'limit' => $limit,
)
);
}
else
{
$request = $smcFunc['db_query']('','
SELECT
m.id_member, m.real_name, m.posts, m.avatar,
a.id_attach, a.attachment_type, a.filename
FROM {db_prefix}members AS m
LEFT JOIN {db_prefix}attachments AS a ON (a.id_member = m.id_member)
ORDER BY posts DESC
LIMIT {int:limit}',
array(
'limit' => $limit,
)
);
}

The 2 queries shown above are for that block function.
The first one is if you opted a time frame for the posts in the block settings, the latter is if you did not.
Add the appropriate conditional logic to both.

ie.
Code: [Select]
$request = $smcFunc['db_query']('', '
SELECT
mem.id_member, mem.real_name, mem.id_group, COUNT(*) as posts,
mem.avatar, a.id_attach, a.attachment_type, a.filename
FROM {db_prefix}messages AS m
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = m.id_member)
LEFT JOIN {db_prefix}attachments AS a ON (a.id_member = mem.id_member)
WHERE ((m.poster_time > {int:start_time}
AND m.id_member != 0) AND (mem.id_group > 0 AND mem.id_group < 4))
GROUP BY mem.id_member
ORDER BY posts DESC
LIMIT {int:limit}',
array(
'start_time' => $start_time,
'limit' => $limit,
)
);
}
else
{
$request = $smcFunc['db_query']('','
SELECT
m.id_member, m.real_name, m.posts, m.avatar, m.id_group,
a.id_attach, a.attachment_type, a.filename
FROM {db_prefix}members AS m
LEFT JOIN {db_prefix}attachments AS a ON (a.id_member = m.id_member)
WHERE (m.id_group > 0 AND m.id_group < 4)
ORDER BY posts DESC
LIMIT {int:limit}',
array(
'limit' => $limit,
)
);
}


The members table contains a column named id_group which contains the members membergroup id#.
The above example only excludes new members (lowest ranked group).
You will need to figure out the membergroup ID#'s you wish to include (or not include) and add the appropriate logic to the above sql query.
mysql syntax:
OR  (or)
AND (and)
=  (equals)
!=  (doesn't equal)
<  (less than)
>  (greater than)
 
ie. to include membergroups 1, 2 and 3 but exclude others:
first query .. mem being the prefix for the members table:
Code: [Select]
WHERE ((m.poster_time > {int:start_time}
AND m.id_member != 0) AND (mem.id_group > 0 AND mem.id_group < 4))

2nd query .. m being the prefix for the members table:
Code: [Select]
WHERE (m.id_group > 0 AND m.id_group < 4)




PHP/mysql option:

file: Sources / PortalBlocks.php

find:
Code: [Select]
$request = $smcFunc['db_query']('', '
SELECT
mem.id_member, mem.real_name, COUNT(*) as posts,
mem.avatar, a.id_attach, a.attachment_type, a.filename
FROM {db_prefix}messages AS m
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = m.id_member)
LEFT JOIN {db_prefix}attachments AS a ON (a.id_member = mem.id_member)
WHERE m.poster_time > {int:start_time}
AND m.id_member != 0
GROUP BY mem.id_member
ORDER BY posts DESC
LIMIT {int:limit}',
array(
'start_time' => $start_time,
'limit' => $limit,
)
);
}
else
{
$request = $smcFunc['db_query']('','
SELECT
m.id_member, m.real_name, m.posts, m.avatar,
a.id_attach, a.attachment_type, a.filename
FROM {db_prefix}members AS m
LEFT JOIN {db_prefix}attachments AS a ON (a.id_member = m.id_member)
ORDER BY posts DESC
LIMIT {int:limit}',
array(
'limit' => $limit,
)
);
}

replace with (just adding id_group to the queries):
Code: [Select]
$request = $smcFunc['db_query']('', '
SELECT
mem.id_member, mem.real_name, mem.id_group, COUNT(*) as posts,
mem.avatar, a.id_attach, a.attachment_type, a.filename
FROM {db_prefix}messages AS m
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = m.id_member)
LEFT JOIN {db_prefix}attachments AS a ON (a.id_member = mem.id_member)
WHERE m.poster_time > {int:start_time}
AND m.id_member != 0
GROUP BY mem.id_member
ORDER BY posts DESC
LIMIT {int:limit}',
array(
'start_time' => $start_time,
'limit' => $limit,
)
);
}
else
{
$request = $smcFunc['db_query']('','
SELECT
m.id_member, m.real_name, m.posts, m.avatar, m.id_group,
a.id_attach, a.attachment_type, a.filename
FROM {db_prefix}members AS m
LEFT JOIN {db_prefix}attachments AS a ON (a.id_member = m.id_member)
ORDER BY posts DESC
LIMIT {int:limit}',
array(
'limit' => $limit,
)
);
}

then you add conditional logic in the php to the loop:
find directly below the above query:
Code: [Select]
$members = array();
$colorids = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
{
if (!empty($row['id_member']))
$colorids[$row['id_member']] = $row['id_member'];

 ie. to include membergroups 1, 2 and 3 but exclude others:
replace with:
Code: [Select]
$members = array();
$colorids = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
{
if ((int)$row['id_group'] < 1 || (int)$row['id_group'] > 3)
continue;

if (!empty($row['id_member']))
$colorids[$row['id_member']] = $row['id_member'];

php syntax:
&&  (and)
||  (or)
<  (less than)
> (more than)
== (equals)
!= (does not equal)



I'm not positive of the exact membergroups (ID#) you are after to post the exact logic shown above.
Hopefully you understand the above edits, if not just post the specific membergroups (ID#'s) that you want to show their posts & I will post the exact edit.
« Last Edit: February 12, 2012, 01:57:03 AM by Underdog »

Offline Q-collective

  • Semi Newbie
  • *
  • Posts: 6
  • SMF Version: 2.0.1
  • SP Version: 2.3.3
Re: Excluding membergroups from blocks
« Reply #7 on: February 12, 2012, 05:17:42 AM »
Thank you for explaining the logic here, much appreciated!

But what are the chances of such a feature being included into a (the?) next version of Simple Portal? If it isn't a feature that is hard to implement, I'll just post a feature request instead, as I have multiple mods running and don't want to run the risk of a forum blackout somewhere down the line because of such manual edits.

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: Excluding membergroups from blocks
« Reply #8 on: February 12, 2012, 05:34:37 AM »
Thank you for explaining the logic here, much appreciated!

But what are the chances of such a feature being included into a (the?) next version of Simple Portal? If it isn't a feature that is hard to implement, I'll just post a feature request instead, as I have multiple mods running and don't want to run the risk of a forum blackout somewhere down the line because of such manual edits.


Of course you are welcome to post a feature request.
Using one of the noted edits will not cause your forum to crash if you implement it as instructed.
As I said, if you inform me of the exact membergroup #'s then I can post the precise edit.

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: Excluding membergroups from blocks
« Reply #9 on: February 14, 2012, 06:23:36 PM »
Actually when I took a closer look I realized the logic for it is a bit more complicated.
 


Here is a custom php block you can use that will do what you wish:
Code: [Select]
$parameters['limit'] = 5;  /* Total number of members to show */
$parameters['type'] = 0;  /* Organize by date types 0 - 3 */
$groups = array(1,2,3);  /* Membergroup id's to NOT include ... 1 = Admin, 2 = Global Mod, 3 = Mod, Post/Group ID#'s, etc.  */

sp_topPoster2($parameters, $groups, false);



function sp_topPoster2($parameters, $groups = array(), $return_parameters = false)
{
global $smcFunc, $context, $scripturl, $modSettings, $txt, $color_profile;

$block_parameters = array(
'limit' => 'int',
'type' => 'select',
);

if ($return_parameters)
return $block_parameters;

$limit = !empty($parameters['limit']) ? (int) $parameters['limit'] : 5;
$type = !empty($parameters['type']) ? (int) $parameters['type'] : 0;

if (!empty($type))
{
if ($type == 1)
{
list($year, $month, $day) = explode('-', date('Y-m-d'));
$start_time = mktime(0, 0, 0, $month, $day, $year);
}
elseif ($type == 2)
$start_time = mktime(0, 0, 0, date("n"), date("j"), date("Y")) - (date("N") * 3600 * 24);
elseif ($type == 3)
{
$months = array( 1 => 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
$start_time = mktime(0, 0, 0, date("n"), date("j"), date("Y")) - (3600 * 24 * $months[(int) date("m", time())]);
}

$start_time = forum_time(false, $start_time);

$request = $smcFunc['db_query']('', '
SELECT
mem.id_member, mem.real_name, mem.id_group, mem.id_post_group, mem.additional_groups, COUNT(*) as posts,
mem.avatar, a.id_attach, a.attachment_type, a.filename
FROM {db_prefix}messages AS m
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = m.id_member)
LEFT JOIN {db_prefix}attachments AS a ON (a.id_member = mem.id_member)
WHERE (m.poster_time > {int:start_time}
AND m.id_member != 0)
GROUP BY mem.id_member
ORDER BY posts DESC
LIMIT {int:limit}',
array(
'start_time' => $start_time,
'limit' => $limit,
)
);
}
else
{
$request = $smcFunc['db_query']('','
SELECT
m.id_member, m.real_name, m.posts, m.avatar, m.id_group, m.id_post_group, m.additional_groups,
a.id_attach, a.attachment_type, a.filename
FROM {db_prefix}members AS m
LEFT JOIN {db_prefix}attachments AS a ON (a.id_member = m.id_member)
ORDER BY posts DESC
LIMIT {int:limit}',
array(
'limit' => $limit,
)
);
}
$members = array();
$colorids = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
{
/* Check if usergroup(s) are to be omitted */
foreach ($groups as $group)
{
if ((int)$group == 0)
continue;

if (((int)$row['id_group'] == 0) && (int)$row['id_post_group'] == (int)$group)
continue 2;
elseif(((int)$group > 3) && (int)$row['id_group'] == (int)$group)
continue 2;
elseif (((int)$row['id_group'] > 0 && (int)$row['id_group'] < 4) && (int)$row['id_group'] == (int)$group)
continue 2;
}

/* Now check possible multiple usergroup(s) */
$additionals = explode(",", $row['additional_groups']);
foreach ($additionals as $addition)
{
foreach ($groups as $group)
{
if ((int)$group == 0)
continue;
elseif ((int)$group == $addition)
continue 3;
}
}
/* End check usergroup omit */

if (!empty($row['id_member']))
$colorids[$row['id_member']] = $row['id_member'];

if ($modSettings['avatar_action_too_large'] == 'option_html_resize' || $modSettings['avatar_action_too_large'] == 'option_js_resize')
{
$avatar_width = !empty($modSettings['avatar_max_width_external']) ? ' width="' . $modSettings['avatar_max_width_external'] . '"' : '';
$avatar_height = !empty($modSettings['avatar_max_height_external']) ? ' height="' . $modSettings['avatar_max_height_external'] . '"' : '';
}
else
{
$avatar_width = '';
$avatar_height = '';
}

$members[] = array(
'id' => $row['id_member'],
'name' => $row['real_name'],
'href' => $scripturl . '?action=profile;u=' . $row['id_member'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '">' . $row['real_name'] . '</a>',
'posts' => comma_format($row['posts']),
'avatar' => array(
'name' => $row['avatar'],
'image' => $row['avatar'] == '' ? ($row['id_attach'] > 0 ? '<img src="' . (empty($row['attachment_type']) ? $scripturl . '?action=dlattach;attach=' . $row['id_attach'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) . '" alt="" class="avatar" border="0" />' : '') : (stristr($row['avatar'], 'http://') ? '<img src="' . $row['avatar'] . '"' . $avatar_width . $avatar_height . ' alt="" class="avatar" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($row['avatar']) . '" alt="" class="avatar" border="0" />'),
'href' => $row['avatar'] == '' ? ($row['id_attach'] > 0 ? (empty($row['attachment_type']) ? $scripturl . '?action=dlattach;attach=' . $row['id_attach'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) : '') : (stristr($row['avatar'], 'http://') ? $row['avatar'] : $modSettings['avatar_url'] . '/' . $row['avatar']),
'url' => $row['avatar'] == '' ? '' : (stristr($row['avatar'], 'http://') ? $row['avatar'] : $modSettings['avatar_url'] . '/' . $row['avatar'])
),
);
}
$smcFunc['db_free_result']($request);

if (empty($members))
{
echo '
', $txt['error_sp_no_members_found'];
return;
}

if (!empty($colorids) && sp_loadColors($colorids) !== false)
{
foreach ($members as $k => $p)
{
if (!empty($color_profile[$p['id']]['link']))
$members[$k]['link'] = $color_profile[$p['id']]['link'];
}
}

echo '
<table class="sp_fullwidth">';

foreach ($members as $member)
echo '
<tr>
<td class="sp_top_poster sp_center">', !empty($member['avatar']['href']) ? '
<a href="' . $scripturl . '?action=profile;u=' . $member['id'] . '"><img src="' . $member['avatar']['href'] . '" alt="' . $member['name'] . '" width="40" /></a>' : '', '
</td>
<td>
', $member['link'], '<br />
', $member['posts'], ' ', $txt['posts'], '
</td>
</tr>';

echo '
</table>';
}

You see this line:
Code: [Select]
$groups = array(1,2,3);

... I used membergroup ID's of 1,2 and 3 (Admin, Global Mod & Mod) as an example and you need to change this array to contain the membergroup ID's you do not wish to include.
In  Admin -> Members -> Membergroups  .. if you hover over the various membergroups you will see their ID#'s at the end of the link (or click on it & it will show up in the address bar). ie. group=3 etc. etc.

This includes multiple usergroups.
« Last Edit: February 16, 2012, 03:41:33 PM by Underdog »

Offline Q-collective

  • Semi Newbie
  • *
  • Posts: 6
  • SMF Version: 2.0.1
  • SP Version: 2.3.3
Re: Excluding membergroups from blocks
« Reply #10 on: February 17, 2012, 05:44:49 AM »
Thank you, this helps a lot :)

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Excluding membergroups from blocks
« Reply #11 on: February 28, 2012, 04:47:27 PM »
Did that solve your problem?
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline FireDitto

  • Jr. Member
  • **
  • Posts: 91
  • Gender: Female
    • Second Pass Weyr
  • SMF Version: 2.0.11
  • SP Version: 2.3.5
  • Elkarte Version: None
Re: Excluding membergroups from blocks
« Reply #12 on: August 15, 2012, 05:30:48 AM »
I've been playing around with this, and I discovered a small 'bug'.

Say I set it to:
$parameters['limit'] = 5;  /* Total number of members to show */
$parameters['type'] = 2;  /* Organize by date types 0 - 3 */
$groups = array(1,2,3,4,5,6,7,8,9,10,12,13,14,15,16,17,18,19,20);  /* Membergroup id's to NOT include ... 1 = Admin, 2 = Global Mod, 3 = Mod, Post/Group ID#'s, etc.  */

I want it to show me the top five, in membergroup 11. That's cool.

However, upon asking that for me I notice several things;

+ Anyone with an additional membergroup is excluded (eg, a lot of accounts also carry MG 16 as a secondary group)

+ It only counts the top 5 out of the entire top number regardless of membergroup, so if there is no one from a membergroup NOT excluded, then it says no members are found to be listed.


How would one make it so it is only searching through the desired membergroups, instead of just showing them if they happen to fit in the top listing?

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Excluding membergroups from blocks
« Reply #13 on: August 21, 2012, 04:40:59 PM »
It would require some additional work to make it the way you wish -- allow "admin" if they are also a member of a group that is NOT excluded -- just a little extra logic.

As for the rest of it -- the annoying "no members found" message, it would require a small amount of work, I think, to add the logic to remove that message.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?