Advertisement
Guest User

Untitled

a guest
Aug 13th, 2014
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.98 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4. * BuddyPress - Members Loop
  5. *
  6. * Querystring is set via AJAX in _inc/ajax.php - bp_legacy_theme_object_filter()
  7. *
  8. * @package BuddyPress
  9. * @subpackage bp-legacy
  10. */
  11.  
  12. ?>
  13.  
  14. <?php do_action( 'bp_before_members_loop' ); ?>
  15.  
  16. <?php if ( bp_has_members( bp_ajax_querystring( 'members' ) ) ) : ?>
  17.  
  18. <div id="pag-top" class="pagination ">
  19.  
  20. <div class="pag-count" id="member-dir-count-top">
  21.  
  22. <?php bp_members_pagination_count(); ?>
  23.  
  24. </div>
  25.  
  26. <div class="pagination-links" id="member-dir-pag-top">
  27.  
  28. <?php bp_members_pagination_links(); ?>
  29.  
  30. </div>
  31.  
  32. </div>
  33.  
  34. <?php do_action( 'bp_before_directory_members_list' ); ?>
  35.  
  36. <ul id="members-list" class="item-list row" role="main">
  37. <?php $count = 0; ?>
  38. <?php while ( bp_members() ) : bp_the_member(); ?>
  39. <?php $count++ ;?>
  40. <li class="bp-klein-members-item col-md-6 col-sm-6 break-row-bottom">
  41.  
  42. <div class="row">
  43. <div class="col-md-4 col-sm-4 item-avatar">
  44. <a href="<?php bp_member_permalink(); ?>"><?php bp_member_avatar( $args = array( 'type' => 'full' ) ); ?></a>
  45. </div>
  46.  
  47. <div class="col-sm-8 col-md-8 item">
  48. <div class="item-title">
  49.  
  50. <?php $user_displayed_name_max = 18; ?>
  51. <?php $user_displayed_name = bp_get_member_name(); ?>
  52. <?php $user_displayed_name_count = strlen( $user_displayed_name ); ?>
  53. <?php if( $user_displayed_name_count >= $user_displayed_name_max ){ ?>
  54. <h5><a class="tip" data-original-title="<?php echo $user_displayed_name; ?>" href="<?php bp_member_permalink(); ?>"><?php echo substr( $user_displayed_name, 0, $user_displayed_name_max ); ?>&hellip;</a></h5>
  55. <?php }else{ ?>
  56. <h5><a href="<?php bp_member_permalink(); ?>"><?php echo $user_displayed_name; ?></a></h5>
  57. <?php } ?>
  58.  
  59. </div>
  60.  
  61.  
  62. <?php do_action( 'bp_directory_members_item' ); ?>
  63.  
  64. <?php
  65. /***
  66. * If you want to show specific profile fields here you can,
  67. * but it'll add an extra query for each member in the loop
  68. * (only one regardless of the number of fields you show):
  69. * bp_member_profile_data( 'field=the field name' );
  70. */
  71.  
  72. $data = bp_get_member_profile_data( 'field=Current Location' );
  73. if( $data != false )
  74. echo $data;
  75.  
  76. ?>
  77.  
  78. </div>
  79.  
  80.  
  81. </div>
  82.  
  83. <div class="clear"></div>
  84. </li>
  85.  
  86. <?php endwhile; ?>
  87.  
  88. </ul>
  89. <div class="clearfix"></div>
  90. <?php do_action( 'bp_after_directory_members_list' ); ?>
  91.  
  92. <?php bp_member_hidden_fields(); ?>
  93.  
  94. <div id="pag-bottom" class="pagination">
  95.  
  96. <div class="pag-count" id="member-dir-count-bottom">
  97.  
  98. <?php bp_members_pagination_count(); ?>
  99.  
  100. </div>
  101.  
  102. <div class="pagination-links" id="member-dir-pag-bottom">
  103.  
  104. <?php bp_members_pagination_links(); ?>
  105.  
  106. </div>
  107.  
  108. </div>
  109.  
  110. <?php else: ?>
  111.  
  112. <div id="message" class="info">
  113. <p><?php _e( "Sorry, no members were found.", 'buddypress' ); ?></p>
  114. </div>
  115.  
  116. <?php endif; ?>
  117.  
  118. <?php do_action( 'bp_after_members_loop' ); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement