<?php function filtering_activity_default( $qs ) {
if ( empty( $qs ) && empty( $_POST['action'] ) ) {
$qs = 'action=activity_update';
}
return $qs;
}
add_filter( 'bp_ajax_querystring', 'filtering_activity_default', 999 ); ?>
<?php if ( bp_has_activities( bp_ajax_querystring( 'activity' ) ) ) : ?>
<?php /* Show pagination if JS is not enabled, since the "Load More" link will do nothing */ ?>
<noscript>
<div class="pagination">
<div class="pag-count"><?php bp_activity_pagination_count() ?></div>
<div class="pagination-links"><?php bp_activity_pagination_links() ?></div>
</div>
</noscript>
<?php if ( empty( $_POST['page'] ) ) : ?>
<ul id="activity-stream" class="activity-list item-list">
<?php endif; ?>
<?php while ( bp_activities() ) : bp_the_activity(); ?>
<?php include( locate_template( array( 'activity/entry.php' ), false ) ) ?>
<?php endwhile; ?>
<?php if ( bp_get_activity_count() == bp_get_activity_per_page() ) : ?>
<li class="load-more">
<a href="#more"><?php _e( 'Load More', 'buddypress' ) ?></a> <span class="ajax-loader"></span>
</li>
<?php endif; ?>
<?php if ( empty( $_POST['page'] ) ) : ?>
</ul>
<?php endif; ?>
<?php else : ?>
<div id="message" class="info">
<p><?php _e( 'Sorry, there was no activity found. Please try a different filter.', 'buddypress' ) ?></p>
</div>
<?php endif; ?>