BuddyDev

Search

Replies

  • Participant
    Level: Initiated
    Posts: 4
    Nash on #9132

    Hi, I have a similar issue but my lightbox is only showing 6 media items in the popup? I have about 12 media items in each of my 3 galleries? s there a setting I am missing, I have just got the latest from github.

    Cheers
    Nash

  • Participant
    Level: Initiated
    Posts: 4
    Nash on #9009

    Hi, Sorry to be a pain but I have figured out how to do most of the above but have one final question. I have decided to just use the media shortcode to list all media, added the hook ‘mpp_after_media_shortcode_item’ to display the title. I chose to use the shortcode because it has the light box with the ability to comment and rate the media (I have the free addon). The ‘doc type’ does not display the pdf, word document etc in the light box, how can I accomplish this please?

  • Participant
    Level: Initiated
    Posts: 4
    Nash on #8945

    Hi, sorry me again:) Also how do I pass pagination parameters to my media query, I would like to have 6 per line and 30 on a page?
    Kind regards
    Nash

  • Participant
    Level: Initiated
    Posts: 4
    Nash on #8943

    Hi,

    Thanks for the information. I have set up my custom search with a custom search form too but have a couple of questions. I have a custom media-loop.php which is called from my custom index.php (all in my child theme mediapress/default/buddypress/directory folder). I would like to show the media in a pop up lightbox from this page, I could accomplish this using the shortcode <?php echo do_shortcode(‘[mpp-list-media search_terms=”” column=6 per_page=30]’); ?> but this doesn’t include the title of the media or pdf or word documents (doc type) do not open in a lightbox? Ideally I would like to display all doc and photos in a lightbox when clicked. Please could you provide a code example of this.
    My media-loop.php code looks like this:

    <?php
    // Exit if the file is accessed directly over web
    if ( ! defined( ‘ABSPATH’ ) ) {
    exit;
    }
    /*$type = $_GET[‘type’];
    echo $type;*/
    $search_terms = $_GET[‘search_terms’];
    //echo $_GET[‘search_terms’];
    //$type = isset( $_POST[‘filter’] ) ? $_POST[‘filter’] : ”;

    //echo $_GET[‘filter’];
    $type = $_GET[‘filter’];
    //echo ‘filter’;
    //echo $_GET[‘filter’];
    //echo $type;

    /**
    * List all galleries for the current component
    *
    */
    ?>

    <?php
    $mppq = new MPP_Media_Query( array(
    //’gallery_id’ => mpp_get_current_gallery_id(),
    ‘component’ => ‘members’,
    ‘type’ => $type,
    ‘page’ => $page,
    ‘search_terms’ => $search_terms
    ) );
    ?>
    <?php if( $mppq->have_media() ): ?>
    <?php while( $mppq->have_media() ): $mppq->the_media(); ?>

    <div class=”mpp-u <?php mpp_media_class( mpp_get_media_grid_column_class() );?>”>

    <?php do_action( ‘mpp_before_media_item’ ); ?>

    <div class=’mpp-item-entry mpp-media-entry mpp-photo-entry’>
    ” class=”mpp-item-thumbnail mpp-media-thumbnail mpp-photo-thumbnail”>
    ” />

    </div>

    <div class=”mpp-item-actions mpp-media-actions mpp-photo-actions”>
    ” class=”mpp-gallery-title”><?php mpp_media_title(); ?>
    <!–<?php mpp_media_action_links();?>–>
    </div>

    <?php do_action( ‘mpp_after_media_item’ ); ?>
    </div>

    <?php endwhile; ?>
    <?php
    mpp_reset_media_data();
    mpp_reset_gallery_data();
    ?>

    <?php endif;?>

    <?php echo do_shortcode(‘[mpp-list-media search_terms=”” column=6 per_page=30]’); ?>