BuddyDev

Search

[Resolved] Open member gallery outside Buddypress

  • Participant
    Level: Initiated
    Posts: 19
    Piotr on #2953

    Hi,

    What i want to achieve is display gallery (from gallery list) in custom page, which is outside Buddypress. Currently when i click on grid item in members gallery list i’m redirect to ‘/members/%member_name%/mediapress/%gallery_name%/’ so gallery view is displayed inside Buddypress member profile page.

    I need to make it go this way:
    1. Gallery view (media list) displayed on custom page template.
    2. Permalink to particular gallery going like this: ‘/galleries/%gallery_name%/’

    Please let me know if it is possible in current version.

    Regards! 🙂

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #2954

    Hi,
    If you don’t want the gallery to be listed on member profile, There are multiple options

    1. Use sitewide gallery. It gives the permalink you are looking for.
    2. Or Overwrite plugins.php in your theme/child theme specifically for MediaPress component
    3. Or you may want to use lightbox/other solutions. We are pushing lightbox support for the shortcodes today/tomorrow and we are also going to release a fullscreen gallery viewer in a day or two.

    Thank you
    Brajesh

  • Participant
    Level: Initiated
    Posts: 19
    Piotr on #2979

    Could you give me more informations?

    1. I want to open members gallery in outside template. How can i combine bot features?
    2. What exactly should i edit in this file?

    Regards! 🙂

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #2989

    Hi Piotr,
    Which template you are using. This is dependent on theme, so a little bit idea about theme will help me. Does your theme has buddypress directory or members directory?

  • Participant
    Level: Initiated
    Posts: 19
    Piotr on #3015

    Hi Brajesh,

    I’m using customized Twentyfifteen theme. I have Buddypress directory and Mediapress directory aswell. For example my customized index.php which displays gallery grid is located in /mytheme/mediapress/default/buddypress/directory/ .

    • This reply was modified 8 years, 8 months ago by Piotr.
  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #3017

    Hi Piotr,
    Thank you.
    MediaPress uses members/single/plugins.php as the base template to load component.

    This file may be used by multiple plugins(for example BuddyBlog etc) to load actual content.
    You can specifically customize this file for MediaPress by using the following code inside it

    
    if ( mpp_is_gallery_component() ) {
    	//load the tem
    }
    
    
  • Participant
    Level: Initiated
    Posts: 19
    Piotr on #3024

    Ok, thanks.

    Tell me where is root for custom templates.

  • Participant
    Level: Initiated
    Posts: 19
    Piotr on #3025

    Ok, i checked this solution but it solves nothing. I still have Buddypress parts in page layout. Only thing changed is customized navs.

    I’m looking for solution that grants me possibility to display member gallery without Buddypress.

    It will be nice too if i can change gallery url’s from this:
    …/members/member_name/mediapress/gallery_name/

    to this:
    …/galerie_uzytkownikow/gallery_name/

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #3028

    Hi Piotr,
    The above changes are not going to help with the URL. It will allow you to use any type of template you want to use. I am using a fullpage template without member header in my case and that is working for me.

    PLease note that gallery urls are dependent on the components they are associated with. User galleries(profile galleries) will have members/mediapress(or the slug of your chice) in the url. Only sitewide gallery will have no members part in their url. I am sorry if that does not suit your need.

    I thought you wanted to change the Layout/View of the single gallery screen which can be done via plugins.php by removing member header etc.

  • Participant
    Level: Initiated
    Posts: 19
    Piotr on #3029

    Thanks for your help Brajesh. I achieved what i want in other way.
    I repleced permalink function in grid tile elements with custom url: /gallery/%gallery_id%/ . I leading by default to page in index.php template. Then, i included “if” function in my index.php. It checks if url has gallery id. If so it includes template part (by standard WP function) and display gallery using shortcode. If no it means this is root galleries page and template display standard gallery grid.

    In this way i save whole Buddypress feature and display custom gallery page aswell.

    I hope this solution will help other users.

    Regards! 🙂

You must be logged in to reply to this topic.

This topic is: resolved