Bunnie
Junior Member
back again
Posts: 204
inherit
71537
0
Jun 1, 2023 12:13:22 GMT -8
Bunnie
back again
204
February 2006
bunnie
|
Post by Bunnie on Feb 15, 2021 8:12:21 GMT -8
Hi,
is it possible, with a plugin, to hide the memberlist from members of a specific group?
|
|
Kami
Forum Cat
Posts: 40,034
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,034
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Feb 15, 2021 11:15:51 GMT -8
Hi, is it possible, with a plugin, to hide the memberlist from members of a specific group? You could do this with a very simple template modification, if you're interested. It would need to be done for each theme, if you have more than one, but would be more reliable than plugins; while neither work on mobile due to software limitations, plugins can be disabled on desktop if a user disables javascript + the page has to load the content before a plugin takes effect. With templates, the content simply doesn't appear. Does that sound acceptable, or would you still prefer a plugin?
|
|
Bunnie
Junior Member
back again
Posts: 204
inherit
71537
0
Jun 1, 2023 12:13:22 GMT -8
Bunnie
back again
204
February 2006
bunnie
|
Post by Bunnie on Feb 15, 2021 11:40:53 GMT -8
Hi Kami,
plugins can be disabled. I've already installed a plugin that blocks access if javascript is disabled. Does that help.
So I want this to be handled in the themes. Can I delete the themes except one, so that members can not change it for themselves?
For mobile it is possible to set what there is to see. I'll look at that.
|
|
Kami
Forum Cat
Posts: 40,034
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,034
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Feb 15, 2021 14:32:57 GMT -8
Hi Kami, plugins can be disabled. I've already installed a plugin that blocks access if javascript is disabled. Does that help. So I want this to be handled in the themes. Can I delete the themes except one, so that members can not change it for themselves? For mobile it is possible to set what there is to see. I'll look at that. That can help but the fact of the matter is simply that client-side effects always take place after content has already loaded. I'm not saying this as a deterrent, but simply to let you know that it will not be a fool proof plan. Yes, you can delete or disable all themes except for one, as long as the theme is not currently set as the "default" theme. It is not possible to alter the mobile view except for the colours. You can DISABLE mobile view in the "experiments" section of the admin panel, but unless you have a theme designed to be mobile responsive that might create a negative experience for any mobile users. So to confirm, you do want the template modification?
|
|
inherit
252032
0
Apr 26, 2024 23:51:41 GMT -8
Retread
Tribbial Pursuit.
5,014
January 2018
retread
|
Post by Retread on Feb 15, 2021 21:05:09 GMT -8
Hi Bunnie The template modification suggested by Kami sounds like a very good plan. That way (on the desktop version) members of the excluded group would see a denial message. All others would see the Member List. But I'd recommend using the Navigation settings as the first line of defense. Don't provide the button for Members for the members who are in the excluded group(s). From your Admin panel, navigate: Admin Home> Settings> Forum Settings then click on the Navigation tab. Un-tick the checkboxes to the left of Members this will remove the stock button: Members in the Navigation Bar. Then click the Add Custom button. A new line will appear. Type Members in the Name column. Type /members in the URL column. Click the Edit button for that line.
A (Permissions) popup will appear. Select Members & Staff in the dropdown for: Who can view this button... To the right of Except members in the groups: click Add Group. A (Select Groups) popup will appear. Tick the checkbox to the left of each group you want to prevent using the Member List. Then click the Done button on the Select Groups popup. The Select Groups popup will disappear. Click the Done button on the Permissions popup. The Permissions popup will disappear.
A savvy forum user will be able to append /members to the home URL of the forum in the address bar and access the member list. But that's where the template modification adds another layer of protection. ... for the desktop version, anyway.
|
|
Bunnie
Junior Member
back again
Posts: 204
inherit
71537
0
Jun 1, 2023 12:13:22 GMT -8
Bunnie
back again
204
February 2006
bunnie
|
Post by Bunnie on Feb 16, 2021 6:02:14 GMT -8
Hi Kami, plugins can be disabled. I've already installed a plugin that blocks access if javascript is disabled. Does that help. So I want this to be handled in the themes. Can I delete the themes except one, so that members can not change it for themselves? For mobile it is possible to set what there is to see. I'll look at that. That can help but the fact of the matter is simply that client-side effects always take place after content has already loaded. I'm not saying this as a deterrent, but simply to let you know that it will not be a fool proof plan. Yes, you can delete or disable all themes except for one, as long as the theme is not currently set as the "default" theme. It is not possible to alter the mobile view except for the colours. You can DISABLE mobile view in the "experiments" section of the admin panel, but unless you have a theme designed to be mobile responsive that might create a negative experience for any mobile users. So to confirm, you do want the template modification? Hi Kami, since the 1st defence in the navigation bar is simple to pass, I want to have it in my theme definition.
|
|
Kami
Forum Cat
Posts: 40,034
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,034
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Feb 16, 2021 10:13:40 GMT -8
That can help but the fact of the matter is simply that client-side effects always take place after content has already loaded. I'm not saying this as a deterrent, but simply to let you know that it will not be a fool proof plan. Yes, you can delete or disable all themes except for one, as long as the theme is not currently set as the "default" theme. It is not possible to alter the mobile view except for the colours. You can DISABLE mobile view in the "experiments" section of the admin panel, but unless you have a theme designed to be mobile responsive that might create a negative experience for any mobile users. So to confirm, you do want the template modification? Hi Kami, since the 1st defence in the navigation bar is simple to pass, I want to have it in my theme definition. Sounds good. 1. Navigate to your Admin panel, then under the Structure menu item, click the drop-down option that reads Layout Templates2. On this page, you should see a dropdown with the theme selected; if you have more than one theme / haven't deleted any extraneous themes yet, be sure to double check that the correct theme is selected. 3. In the list of templates, select Members, then stay on the Members tab on the subsequent page. 4. Place your cursor at the beginning of the first line in the text area. Create a new line, and add the following code: {if $[current_user.group.name] != "Group Name Here"} Replace Group Name Here with the group's name. This is CASE SENSITIVE, so "Name" "NAME" "name" and "nAmE" will all be considered different groups. Do not delete the quotation marks around the group name. 5. Once that's done, scroll the text box all the way to the bottom. At the end of the last line, place your cursor and create a new line. Add this to the new line: {/if} Save your changes. To test this, create a new account and using your primary account add the secondary account to the member group you want blocked from the member list. If all has gone well, this account should not be able to view the list. Let me know how it goes (:
|
|
inherit
252032
0
Apr 26, 2024 23:51:41 GMT -8
Retread
Tribbial Pursuit.
5,014
January 2018
retread
|
Post by Retread on Feb 16, 2021 15:38:19 GMT -8
{if $[current_user.group.name] != "Group Name Here"} Hi KamiI thought I'd share some information I discovered about the $[current_user.group.name] and it's cousin $[current_user.group.id]. I did some testing with them and the results were not at all what I expected! These variables don't include information about ALL groups the member is in. Only the group that's displayed on the member's profile/mini-profile. If the member is in the group but has chosen to not display a group or to display a different group, those variables won't be useful. Also, if the group in question is a Hidden group, and that's the only group the member is in, those variables still won't detect it. I dunno if a variable exists that would be useful for any group the member is in, regardless of whether or not it's displayed in the profile/mini-profile. Might be a question worth asking the Developers?
|
|
Kami
Forum Cat
Posts: 40,034
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,034
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Feb 16, 2021 15:59:10 GMT -8
{if $[current_user.group.name] != "Group Name Here"} Hi Kami I thought I'd share some information I discovered about the $[current_user.group.name] and it's cousin $[current_user.group.id]. I did some testing with them and the results were not at all what I expected! These variables don't include information about ALL groups the member is in. Only the group that's displayed on the member's profile/mini-profile. If the member is in the group but has chosen to not display a group or to display a different group, those variables won't be useful. Also, if the group in question is a Hidden group, and that's the only group the member is in, those variables still won't detect it. I dunno if a variable exists that would be useful for any group the member is in, regardless of whether or not it's displayed in the profile/mini-profile. Might be a question worth asking the Developers? Unfortunately this is known behaviour and is expected because variables will only pick up on what's displayed / selected as the only group the user is part of. If I recall, this has already been requested for v6 but I'll definitely make a note for the team as it really cuts on core functionality. Right now the only away around it is to use multiple conditions if your users are expected to be part of multiple groups, though that's hit and miss depending on what you're trying to do. There is no variable that gets all groups, which is a known issue / area for improvement for v6 (though I cannot guarantee its addition at this point, just that it's something that was at least being looked into as a QOL improvement).
|
|
Bunnie
Junior Member
back again
Posts: 204
inherit
71537
0
Jun 1, 2023 12:13:22 GMT -8
Bunnie
back again
204
February 2006
bunnie
|
Post by Bunnie on Feb 18, 2021 12:43:54 GMT -8
Thanks you both for your replies. For now I'll put in two conditions - one for being member of the group
- one if no groupname is there
If the member is on another group also, it is okay.
|
|
Bunnie
Junior Member
back again
Posts: 204
inherit
71537
0
Jun 1, 2023 12:13:22 GMT -8
Bunnie
back again
204
February 2006
bunnie
|
Post by Bunnie on Feb 18, 2021 12:58:02 GMT -8
Let me know how it goes (: Thanks Kami, works like a charm
|
|
Kami
Forum Cat
Posts: 40,034
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,034
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Feb 18, 2021 12:58:32 GMT -8
Thanks you both for your replies. For now I'll put in two conditions - one for being member of the group
- one if no groupname is there
If the member is on another group also, it is okay.
Do you know how to accomplish this, or do you need assistance? The syntax is very particular.
|
|
Bunnie
Junior Member
back again
Posts: 204
inherit
71537
0
Jun 1, 2023 12:13:22 GMT -8
Bunnie
back again
204
February 2006
bunnie
|
Post by Bunnie on Mar 4, 2021 6:44:34 GMT -8
I did it. thanks
|
|