BuddyDev

Search

Plugin to Stop Private Groups

  • Participant
    Level: Enlightened
    Posts: 31
    Steven May on #32464

    Do any of your plugins block private groups? I want all groups created on the site to be public groups.

  • Keymaster
    (BuddyDev Team)
    Posts: 24577
    Brajesh Singh on #32465

    Hi Steven,
    Thank you for the question.

    Currently, The only correct way to do it is via template override. Which theme and template pack are you using?

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 31
    Steven May on #32468

    Im using the Divi Theme.

    Buddy Press Nouveau

  • Keymaster
    (BuddyDev Team)
    Posts: 24577
    Brajesh Singh on #32469

    Thank you.

    You will need to copy bp-nouveau/buddypress/groups/single/admin/group-settings.php to yourtheme/buddypress/groups/single/admin/group-settings.php and modify to remove the privacy.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 31
    Steven May on #32472

    Thank you I knew I could customize the functions php to do it. I was looking for a plugin solution or if there was a checkbvox in one of the budddypress products I already use that weould deactivate it.

  • Keymaster
    (BuddyDev Team)
    Posts: 24577
    Brajesh Singh on #32477

    Hi Steven,
    The problem is, it is plain markup and there are no simple way to hide it. Using css, It can be but will not work for all themes.
    So, template override is the current suggested method. In future, if there are hooks available, It could be done via plugin.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 1
    bob13 on #32978

    Someone set up 10000 groups on my site, is there a quick way to delete them all

  • Keymaster
    (BuddyDev Team)
    Posts: 24577
    Brajesh Singh on #32979

    Hi bob13,
    The best way to delete groups will be using database.

    If you are comfortable with database, Please follow the steps below. Please note that these can not be undone.

    1. Take a complete backup of your database. In case something goes wrong, you can restore.

    2. Find the user id. I am assuming it is 2. It should be some numeric id.

    3. Find the table prefix . I am assuming it is wp_. You will need to replace the prefix and user id in all the queries below.

    4. View all groups from that user, you may run

    
    
    SELECT id FROM wp_bp_groups WHERE creator_id=2
    
    

    4. Clean Group meta

    Check meta entries count for these groups

    
    
    SELECT COUNT('*') FROM wp_bp_groups_groupmeta WHERE group_id IN( SELECT id FROM wp_bp_groups WHERE creator_id=2 )
    
    

    Delete all these meta

    
    
    DELETE FROM wp_bp_groups_groupmeta WHERE group_id IN( SELECT id FROM wp_bp_groups WHERE creator_id=2 )
    
    

    5. Clean members table

    Check the number of members in these groups.

    
    
    SELECT COUNT('*') FROM wp_bp_groups_members where group_id IN( SELECT id FROM wp_bp_groups WHERE creator_id=2 )
    
    

    Delete these entries

    
    
    DELETE FROM wp_bp_groups_members where group_id IN( SELECT id FROM wp_bp_groups WHERE creator_id=2 )
    
    

    6. Clean activity table.

    View entries count.

    
    
    SELECT COUNT('*') FROM wp_bp_activity WHERE component="groups" AND item_id IN( SELECT id FROM wp_bp_groups WHERE creator_id=2 )
    
    

    Delete entries

    
    
    DELETE FROM wp_bp_activity WHERE component="groups" AND item_id IN( SELECT id FROM wp_bp_groups WHERE creator_id=2 )
    
    

    6. Finally, Delete all groups

    
    
    DELETE FROM wp_bp_groups WHERE creator_id=2
    
    

    That’s all.
    Do not forget to take a backup before any of these command.

    Regards
    Brajesh

    PS:- In future, Please open your own topic for discussion.

  • Keymaster
    (BuddyDev Team)
    Posts: 24577
    Brajesh Singh on #32980

    Please do not copy the code from email(if you have notifications enabled). Please use it form here.

You must be logged in to reply to this topic.

This topic is: not resolved