Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jun 9th, 2011  |  syntax: PHP  |  size: 1.38 KB  |  views: 223  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php function filtering_activity_default( $qs ) {
  2.  if ( empty( $qs ) && empty( $_POST['action'] ) ) {
  3.  $qs = 'action=activity_update';
  4.  }
  5.  
  6.  return $qs;
  7.  }
  8.  add_filter( 'bp_ajax_querystring', 'filtering_activity_default', 999 ); ?>
  9.  
  10. <?php if ( bp_has_activities( bp_ajax_querystring( 'activity' ) ) ) : ?>
  11.  
  12.         <?php /* Show pagination if JS is not enabled, since the "Load More" link will do nothing */ ?>
  13.         <noscript>
  14.                 <div class="pagination">
  15.                         <div class="pag-count"><?php bp_activity_pagination_count() ?></div>
  16.                         <div class="pagination-links"><?php bp_activity_pagination_links() ?></div>
  17.                 </div>
  18.         </noscript>
  19.  
  20.         <?php if ( empty( $_POST['page'] ) ) : ?>
  21.                 <ul id="activity-stream" class="activity-list item-list">
  22.         <?php endif; ?>
  23.  
  24.         <?php while ( bp_activities() ) : bp_the_activity(); ?>
  25.  
  26.                 <?php include( locate_template( array( 'activity/entry.php' ), false ) ) ?>
  27.  
  28.         <?php endwhile; ?>
  29.  
  30.         <?php if ( bp_get_activity_count() == bp_get_activity_per_page() ) : ?>
  31.                 <li class="load-more">
  32.                         <a href="#more"><?php _e( 'Load More', 'buddypress' ) ?></a> &nbsp; <span class="ajax-loader"></span>
  33.                 </li>
  34.         <?php endif; ?>
  35.  
  36.         <?php if ( empty( $_POST['page'] ) ) : ?>
  37.                 </ul>
  38.         <?php endif; ?>
  39.  
  40. <?php else : ?>
  41.         <div id="message" class="info">
  42.                 <p><?php _e( 'Sorry, there was no activity found. Please try a different filter.', 'buddypress' ) ?></p>
  43.         </div>
  44. <?php endif; ?>
clone this paste RAW Paste Data