News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Any Way non Admins can see a MemberGroup List?

Started by Lordmiller, July 24, 2010, 02:29:16 PM

Previous topic - Next topic

Lordmiller

Using 2.0 RC3

I'm trying to figure out a way where a regular member can get a list of members within a given membergroup.

I know on the admin panel I can go in and click on a membergroup which will display me all members who are in that group (along with the add/remove fields and buttons).

Anyone can search the memberlist based on "Position" but this only works for the primary membergroup, it won't pick up on a member of that group who has some other group selected as their primary.

Now I don't want to allow regular members to view that admin panel page, and search members doesn't seem to be doing it, is there something I'm missing that would make it possible for a regular member to just get a list of people who are part of a given group regardless of if it's their primary or not?

kat

Go to this forum's front page: http://www.simplemachines.org/community/index.php

Scroll to the bottom and you'll see "Users Online", with a legend, at the bottom, showing member groups.


Click on one of those membergroups and you'll see the members of that group.

Is that what you're after?


Lordmiller

Heh. . .sometimes the answer lies right under your nose, doesn't it. . . .(/selfsmack)

That does quite perfectly list out all the members of each of those groups. . .The "business cards" are nice too, though I was happy enough just to have a list, those would work for what I'm trying to do.

How is that done? Is it a mod?

Matthew K.

It's actually a base feature you can enable via the Admin panel.

Admin > Current Theme > Show group key on board index - Check

Lordmiller

Sweet. . .never thought to look there.

Does it only show the groups which have a color assigned to them?

Matthew K.

No, it shows all non-post based groups that are not hidden. (AFAIK)

TheListener

Lordmiller have a look at this mod

http://www.simplemachines.org/community/index.php?topic=219437.0

This may be what you are after. The newest upgrade is within the last few pages of the mod so some digging is required.

Have a look at my forum link in my sig and you will see what it does.

Matthew K.

Brack, note that this is in SMF 2.x Support. A membergroup legend/key is a default feature for SMF 2.0x, and the mod you linked to is 1.1x anyways.

The solution I gave in this post will accomplish what the topic starter wants.

TheListener

The mod I linked to works on 2.0 RC3 and 1.1

The mod I linked to shows rthe membergroups and non post count groups.

Lordmiller

Labradoodle, it seems to only work if you turn a color on, I went to a group that was not showing, only changed it by adding a color, and it appeared on that list, so it does seem to be color related.

Dag, it looked exactly right as Admin, everyone in any given group was listed. . . .but when I logged out and came in as my quality testing regular member account, it has the same issue as memberlist searches based on "position". . .for regular members those fields only list members for whom that group is their Primary. . .

i.e. if someone is a member of a number of groups, they won't show up in all of them, only in their primary. . . that solution only does what I want it to do when an Admin is looking, not a regular member. . .

Is there a setting I'm missing in terms of the key display?

Antechinus

Also note that you can modify the default memberlist so that it will return results by membergroup. I've done that on the site I help to run and will be doing the same when we upgrade to 2.0.

http://www.councilofexmuslims.com/index.php?action=mlist and http://www.councilofexmuslims.com/index.php?action=mlist;sa=exm

I can dig out the code for that if you're interested. Shouldn't be hard to tweak it for 2.0.

Lordmiller

Thanks Antechinus, but I think that may run into the same issue of only showing the primary membergroup. . . .I'm trying to figure out how to show a list of members of Group A, Group B, Group C. . . .regardless of if that membership is primary or not. . .

It seems like the way things currently work, even if Member #234 is in membergroups A, B and C. . .they will show up in A, their primary membergroup, and not show up in B or C. . .except to an admin, who will see them as being in all three groups. . .it's curious and annoying.

Antechinus

Well I (or more accurately, I with a lot of help from Arantor) coded that sa on the memberlist so that it pulls up people by primary or secondary group. As an example, the other admins and moderators are in that group as a secondary group and still show in the listing.

Lordmiller

Nice, that sounds like a very promising lead. . . .if you can dig the code out on that I would greatly appreciate it.

Antechinus

Since I'll be needing it for 2.0 soon anyway I'll take a look at it as soon as I can. ;)

Lordmiller


Lordmiller

#16
I've been fiddling around with the membergroup key since y'all got me pointed into it yesterday, it seems to run as a commandline which you could use anywhere (Like I could stick it into a menu if I wanted to). For instance:

http://www<<Yourforumname>>/index.php?action=groups;sa=members;group=1

Will bring up the list of admins on any of our boards. . .

I'm wondering if there's a modifier or something that could be stuck into that line which will allow for it to show all members rather than just all primary members in that group? If not, then I'm guessing I need to await that code snip from Antechinus.

Antechinus

This is the 1.1.x version. http://www.simplemachines.org/community/index.php?topic=371099.msg2543196#msg2543196

I don't have time to do a 2.0 version right at the moment as I'm concentrating on RC4 and other pressing things.

Stuck CAPS

You can then add the page to your Members tab, by replace this code in public_html/[forumdirectory]/Soruces/subs.php
'mlist' => array(
'title' => $txt['members_title'],
'href' => $scripturl . '?action=mlist',
'show' => $context['allow_memberlist'],
'sub_buttons' => array(
'mlist_view' => array(
'title' => $txt['mlist_menu_view'],
'href' => $scripturl . '?action=mlist',
'show' => true,
),
'mlist_search' => array(
'title' => $txt['mlist_search'],
'href' => $scripturl . '?action=mlist;sa=search',
'show' => true,
'is_last' => true,
),
),
),

with
'mlist' => array(
'title' => $txt['members_title'],
'href' => $scripturl . '?action=mlist',
'show' => $context['allow_memberlist'],
'sub_buttons' => array(
'mlist_view' => array(
'title' => $txt['mlist_menu_view'],
'href' => $scripturl . '?action=mlist',
'show' => true,
),
'mlist_search' => array(
'title' => $txt['mlist_search'],
'href' => $scripturl . '?action=mlist;sa=search',
'show' => true,
                                        ),
                                        'mgroup_view' => array(
                                                'title => $txt['mgroup_view'],
                                                'href => '[LINKTOYOURMEMBERGROUPSPAGE]',
                                                'show' => true
                                                'islast' => true
),
),
),


Then, in public_html/[YOUR FORUM'S DIRECTORY/Themes/[YOUR CURRENT THEME]/languages/index.english.php
search for

$txt['mlist_search'] = 'Search For Members';

and replace it with
$txt['mlist_search'] = 'Search For Members';
$txt['mgroup_view'] = 'List of Membergroups';


Finally, clear your forum's cache.
My website: iCAPS


Lordmiller

Hmm, this whole aspect of the software offers 3 different results to similar places. . .if I log in as my testing regular member account click on the link for "Administrators" in the groups  I go to:

http://www<<Yourforumname>>/index.php?action=groups;sa=members;group=1

And the "Home" tab of the top menu is highlighted to indicate where I am.

But logged in as me (Admin) if I click there it says I am at the link above, but where it actually takes me is:

http://www.<<yourforumname>>/index.php?action=moderate;area=viewgroups;sa=members;group=1

With the Moderate tab highlighted, the full moderation sub menu open, and the add/remove buttons.

Yet if I go look at the membergroup Administrators on the admin panel, I go to:

http://www.<<Yourforumname>>/Index.php?action=admin;area=membergroups;sa=members;group=1

So if action is Admin or Moderate, Area = Viewgroups,  it shows the whole list, while if action is Groups,  it only shows primary members?

I wonder, are there any other valid Action or SA codes for that commandline request?


Lordmiller

Depends, does that mod only display primary memberships, or does it display all members in the given group, regardless of if it's primary, secondary or whatnot?

I didn't notice anyone showing up in more than one of the groups in the demo page that works.

Deaks

you can set it to show both primary and secondary.
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Lordmiller

That's one of the normal on/off switches, or would I need to code mod it to work that way?

Various Rulez

http://www.beatthebullies.co.cc/index.php - My Site Beat The Bullies

User: x_magma_x - PM if you are intrested in Mod :)

email - [email protected]

Lordmiller

Installed the Team Page mod, it's working perfectly for what I needed, thanks a lot!

Advertisement: