Skip to:
Content
Pages
Categories
Search
Top
Bottom

BP_Album –> do_action( 'bp_album_all_images' );

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

  • Matt McFarland
    Participant

    @matt-mcfarland

    This is not a PHP issue, it is more a CSS html issue..

    Looks like #buddypress is missing in the DOM. Check your file and make sure you put that in there.


    Matt McFarland
    Participant

    @matt-mcfarland

    I have both pages loaded up on my dual monitors, #buddypress is missing, just checked for a second some other things could be missing too. Click the imgur link below to see what I mean.
    See the difference?


    luigilom
    Participant

    @luigilom

    Thanks for the info
    I have been in the WP-album plugin /wp-content/plugins/bp-album/includes/templates/album/all-images.php
    // To use this sub-template, just add “do_action( ‘bp_album_all_images’ ); ” to any template on your site
    So I think you have to at the BP in a php to edit the .CSSĀ come.


    luigilom
    Participant

    @luigilom

    This is the php, I must here make a change ?

    <?php

    // To use this sub-template, just add “do_action( ‘bp_album_all_images’ ); ” to any template on your site

    global $bp;
    $args = array();

    $args[‘owner_id’] = false; // Do *not* change this
    $args[‘id’] = false; // Do *not* change this
    $args[‘page’]=1; // Do *not* change this
    $args[‘max’]=false; // Do *not* change this
    $args[‘privacy’]=’public’; // Do *not* change this
    $args[‘priv_override’]=false; // Do *not* change this
    $args[‘groupby’]=false; // Do *not* change this

    $args[‘per_page’]=24;
    $args[‘ordersort’]=’DESC’;
    $args[‘orderkey’]=’id’; // You can also use ‘random’ to shuffle images, but this will slow down your site
    $images_per_row = 5;

    // STEP 1: Run the query.
    bp_album_query_pictures($args);

    $row_count = 0;

    // STEP 2: Check items were found. If so, open the CSS block.
    if ( bp_album_has_pictures() ) : ?>

    <div class=”bpa-content-wrap” id=”default”>

    <table class=”bpa-content-sitewide”>
    <tr>

    <?php
    // STEP 3: Iterate through the items the query has found, printing out each one.
    while ( bp_album_has_pictures() ) : bp_album_the_picture(); ?>

    <td>
    ” class=”media-image”>‘ />
    </td>
    <?php

    $row_count++;

    if($row_count == $images_per_row){
    echo ‘</tr><tr>’;
    $row_count = 0;
    }

    endwhile;

    // STEP 4: Close the CSS block. ?>
    </tr>
    </table>
    </div><?php

    endif;

    // This db call resets the pictures template after generating the all images block. If it is removed,
    // and the all-images block is used on a page that contains a user image or gallery, the content
    // after the all-images block will not render correctly.

    bp_album_query_pictures();

    ?>

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘BP_Album –> do_action( 'bp_album_all_images' );’ is closed to new replies.
Skip to toolbar