Skip to:
Content
Pages
Categories
Search
Top
Bottom

how do i disable members from creating groups?


  • capitalistdog
    Participant

    @capitalistdog

    I don’t want members on my site to be able to create t heir own groups, but rather just participate in the ones created by the admin.

    I am using a single installation of wordpress. How do I go about setting the permissions of my members, or is this possible?

    Thanks.

Viewing 9 replies - 1 through 9 (of 9 total)
  • probably a half dozen threads discussing the same howto


    capitalistdog
    Participant

    @capitalistdog

    really? I can’t seem to find anything directly related to this. I seem to remember an option in WPMU, but perhaps i’m mistaken.


    snark
    Participant

    @snark

    I too would like to do this — I searched around for awhile, and found the subject mentioned in a few places, but I couldn’t find a resolution. I want to make it so only WP users with Editor or higher user roles can create new Groups. Is this doable?

    This will make it where only wp-admins can do it. make sure you’re doing this in your child theme, not the core bp-default files:

    In the groups folder > index.php…right after the form tag replace the next few lines with:

    <br />
    <h3>
    <?php _e( 'Groups Directory', 'buddypress' ) ?>
    <?php if ( current_user_can('manage_options') ) : ?>
    button goes here
    <?php endif; ?>
    </h3>

    the dumb editor keeps jacking up the code. the button for creating the group shouldn’t change and should go where indicated above


    snark
    Participant

    @snark

    Man I’m dense — too many sleepless nights doing this are taking their toll on me. I already asked for help on this in another thread, received help, and even successfully implemented it. I thought it seemed like deja vu all over again. Doh! See this thread, especially the last few posts:

    https://buddypress.org/forums/topic/forum-user-roles-and-moderator-ability-bp-12-rc2-wp-291#post-36543

    The solution by intimez near the end of the thread is basically the one above, but with the button code included.

    Ahh, now it’s all coming back to me…


    snark
    Participant

    @snark

    Here is the complete code this is working successfully for me to block anybody with a user role below “Editor” from having the option to create new Groups:

    <h3>
    <?php _e( 'Groups Directory', 'buddypress' ) ?>
    <?php if ( current_user_can( 'delete_others_posts' ) ) : //only admins and editors can see this ?> &nbsp;
    <a class="button" href="<?php echo bp_get_root_domain() . '/' . BP_GROUPS_SLUG . '/create/' ?>">
    <?php _e( 'Create a Group', 'buddypress' ) ?></a><?php endif; ?>
    </h3>

    only problem with removing the link:

    <?php echo bp_get_root_domain() . '/' . BP_GROUPS_SLUG . '/create/' ?> someone could still access the url directly to start the process.

    I went ahead and created a plugin (waiting on repo request on wordpress.org) to disable the steps and show a ‘new groups creation is closed’ message. Also added in a midlevel-cap to allow another set of users the ability to create private/hidden + w/forums. I may expand this to restrict other steps in the group creation process (as other plugins using the group extension api may add in their own step)

    Basically the plugin removes the $bp->groups->group_creation_steps – adds in a custom position 0 step to display a closed page.


    hydroweb
    Participant

    @hydroweb

    Will this make it so that member sees only forums, and in forums a list of “groups” or “themes” or whatever, that have been created by admin/editor? No groups tab in bp default theme. Thanks, Roger


    agrundner
    Member

    @agrundner

    For those interested, the plugin etiviti (rich!) created for this issue can be found here:

    BuddyPress Restrict Group Creation

    https://wordpress.org/extend/plugins/buddypress-restrict-group-creation/

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘how do i disable members from creating groups?’ is closed to new replies.
Skip to toolbar