BuddyDev

Search

Documents bypass gallery selection

  • Participant
    Level: Enlightened
    Posts: 27
    studioleland on #14586

    Hello,

    I am only using the Documents media type. I want to bypass any gallery selection or creation. My BP members only need to upload their files without creating galleries. Are there any hooks I can use to bypass the galleries process? It’s extra steps that can be confusing for members to click on media -> documents -> new gallery -> new document. We are trying to just show a table of documents and option to upload more for each user.

  • Keymaster
    (BuddyDev Team)
    Posts: 24250
    Brajesh Singh on #14608

    Hi Leland,
    Thank you for posting.

    In the current setup, we can accomplish it in the same way as the activity upload.

    Use an uploader and if the document gallery is not present, create it automatically for the user.
    The hook for it will be ‘mpp_get_context_gallery’ . We use it internally for automatically creating wall galleries.

    Here is the implementation for the activity wall gallery
    https://github.com/buddydev/mediapress/blob/master/modules/buddypress/activity/mpp-activity-hooks.php#L136

    Hope that helps.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved