Skip to:
Content
Pages
Categories
Search
Top
Bottom

Duplicate Groups Component


  • enda77
    Participant

    @enda77

    Hi all,

    I would like to duplicate/copy the group’s component for my website. This has come up before at:
    duplicating-group-component
    and
    duplicate-group-components-multiple-group-types
    but a solution was never shown.

    I need an extra groups component because I am keeping the standard groups component and adding a ‘parks’ component which has extra function tabs including a leaderboard for each park, location maps, and park information. It also has the standard group functions of members, home, posts and notifications. I won’t be setting up a forum on the site.

    If this can be done another way without duplicating the groups component, I’d look into it and any other option which might be available.

    I’d like to know your opinions, and if there is someone who has been down this road before…

Viewing 4 replies - 1 through 4 (of 4 total)

  • shanebp
    Moderator

    @shanebp

    You have 2 choices, both require some hours of work and good coding skills, which is why a ‘solution’ was never shown, just explained.

    1. Create a new component based on the Groups component

    2. Use groups_meta to add a field re ‘park’ and use that to determine if your extra tabs should be added to a group via the BP_Groups_API
    https://codex.buddypress.org/plugindev/how-to-edit-group-meta-tutorial/
    https://codex.buddypress.org/developer/group-extension-api/


    shanebp
    Moderator

    @shanebp

    Re #2 this is a much better approach than using group_meta…

    https://codex.buddypress.org/developer/group-types/

    Then use the group type to determine if your extra tabs should be added to a group via the BP_Groups_API


    enda77
    Participant

    @enda77

    Thanks for the suggestions Shane.

    If I use #2 is it possible to have ‘groups’ and ‘parks’ as separate component tabs on the profile page so ‘groups’ and ‘parks’ can be created and show in their relevant tab?
    I have looked at the ‘add group types’ plugin previously but all groups are shown together in the ‘groups’ tab.

    As for #1 do you know if the method of copying out bp-groups, find&replacing ‘groups’ to ‘parks’ and creating a loader will still work because this was last mentioned 4 years ago? They also mention having to modify core code which is putting me off.

    Any option for #3, do you do freelance work? 🙂


    shanebp
    Moderator

    @shanebp

    Re #2 – you can add a tab and content to profile pages. And you can over-ride the profile groups template to not show parks.

    Re #1 – you don’t need to modify core code.

    #3 – yes, you can contact me thru my profile

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar