imath / altctrl-public-group

BuddyPress plugin to provide an alternative control to group admins on their public groups
https://imathi.eu
GNU General Public License v2.0
22 stars 6 forks source link

groups open to all logged-in users #13

Open gyrus opened 6 years ago

gyrus commented 6 years ago

We're looking to create a new group privacy option which is basically like 'Public', but where it's open to all logged-in users (not to users who aren't logged in). This seems like quite a simple requirement, but I gather from looking through the code, and from reading about this plugin, that modifying group privacy options is quite a task with BuddyPress. However, it doesn't seem as if this plugin covers this simple requirement.

What's your sense of how easy this would be to achieve? Based on your experience with this plugin, could it be done with a bit of custom theme code, or would it make sense to extend this plugin?

imath commented 6 years ago

Hi,

I just added this branch https://github.com/imath/altctrl-public-group/tree/2.1 so that you can test if the "logged in only" visibility is what you are looking for.

If so, i'll merge it with master. Thanks for your feedback.

gyrus commented 6 years ago

Thanks for the quick response, that's amazing.

I can see the 'Public for logged in members only' option under Settings > BuddyPress > Options, but it's greyed out. In fact all the options here are greyed out. 'Public' and 'Public with member requests' are selected, the other 3 aren't, but none can be changed. Editing a group, the Privacy options are still just Public / Private / Hidden.

We have all BP components activated - is there anything else I should check?

imath commented 6 years ago

That's probably because you are not allowing groups to be created by regular users:

capture-01

You need to activate the checkbox Enable group creation for all users and save your options to finally be able to set the custom visibility settings for public groups :

capture-02

gyrus commented 6 years ago

I assume we need to keep all users from being able to create groups. However, if I temporarily changed that setting, I was able to activate the other visibility options, then change it back.

Now when I select 'Public for logged in users' on a group I get this error:

You cannot remove all administrators from a group. An error occurred when trying to update your group details.

The group does appear to be visible to logged-in users, though. Any idea about this 'error'?

Also, out of curiosity, why are the options in admin labelled 'Control - Joining group'? I guess the current options you have are about joining, whereas this new one has been shoehorned in, even though it's just about viewing? And it's not possible to add options to 'Settings - Privacy'?

gyrus commented 6 years ago

I'll get the client to test things on the staging site and I'll see what they make of it - many thanks.