Skip to:
Content
Pages
Categories
Search
Top
Bottom

removing certain group activity and groups from my groups section


  • firetag
    Participant

    @firetag

    I am almost done with my group categories/types plugin and one of the last things I need to do is stop certain groups from having membership to them users still join the group but it appears they never joined anything… I started doing this by getting rid of the send invites and members sub nav items and now all I need to do is get rid of the activity stream updates when users join the group and stop the group from appearing in the my groups section of the users profile… Anyone have any ideas on how to do this? I would rather not have it JavaScript dependent either, but just knowing how to go about this without changing the theme or anything would be great.

Viewing 6 replies - 1 through 6 (of 6 total)
  • this will block all new entries for certain activity stream types:
    https://wordpress.org/extend/plugins/buddypress-block-activity-stream-types/

    but i’m sure you could extract the code or modify it for a certain group, etc.

    or you could loop over the has_activities filter and unset the items based on type


    pcwriter
    Participant

    @pcwriter

    @firetag

    Check out buddypress/bp-groups.php/ at line 1278. There’s already a function in there to hide the activity sitewide for any group that is NOT public. I’m by no means a coder, so I’m just guessing here, but maybe you can create/assign a new status for the category groups. By snooping around in the same file, you might find other actions/hooks to keep them out of profiles too.

    EDIT – Just saw @rich‘s post :-)


    firetag
    Participant

    @firetag

    @pcwriter actually thanks for posting this will work so much better because I would still like to have activity for the group just not show up anywhere, but on that group page so this will work great! I’ll still have to do some poking around though in order to make sure people can join without being invited… but thanks this is a great start.


    pcwriter
    Participant

    @pcwriter

    @firetag

    So, you’re looking for a “crossover” between private and public groups. Private so the activity doesn’t show in the stream (but it does show in the group) yet public so folks don’t need to be invited to join.

    This might help: on lines 71 to 101 is the function/action for groups_setup_globals. On line 97 is the valid_status array (public, private, hidden) where I’m thinking you could add a new status like “category”. As that new status would not be “public”, activity shouldn’t show up in the main stream, and as it wouldn’t be “private” either, neither invitations nor membership requests would be needed.

    What do you think…doable?

    EDIT: I guess you would need a way to keep that option out of the preselects available to users at the group creation stage though. Hmmm…


    firetag
    Participant

    @firetag

    @pcwriter hmm yeah I guess I could make a new status type… I know in a future release of buddypress though there is one more status type which is in between public and private like we need here… I’ll check it out on the trac…. that only problem is I’d like a quick solution with no core hacks so I can just get the plugin released and then if people want I could show them how to hack the core to do something like this…


    firetag
    Participant

    @firetag

    alright I figured this out with a one line core hack, but I decided that it almost doesn’t make since to hide it from the activity stream… I don’t know if that’s what I want it to do anymore or not… I don’t know what does everyone else think?

    EDIT: I just don’t know if it’s worth the time to do this… maybe we should just make it look like a group… but just hide the members and send invites tabs….

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘removing certain group activity and groups from my groups section’ is closed to new replies.
Skip to toolbar