valuser

members-loop-adjusted

Mar 11th, 2016
302
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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' ). '&per_page='.sq_option('bp_members_perpage', 24) ) ) : ?>
  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.     <!-- addedbyval -->
  36.     <hl><?php $user_id = bp_get_member_user_id(); $ydata = get_user_meta($user_id, 'genre',true); $x = get_blog_option( BP_ROOT_BLOG, 'siteurl'); $array=parse_url(get_blog_option( BP_ROOT_BLOG, 'siteurl')); $array['host']=explode('.', $array['host']); $xvar = trailingslashit($x); $bvar = ucfirst( $array['host'][0]);   $avar = "For a list of those who have registered "; $cvar = " as their Home Place "; $jvar = "This is a list of all IsOurPlace Community Members who have ever visited the ";echo $jvar."<strong>".$bvar."</strong>"."<mup> IsOurPlace</mup> Community"."."."<br/>"; echo $avar."<strong>".$bvar."</strong>".$cvar; ?><a href="<?php echo get_blog_option( BP_ROOT_BLOG, 'siteurl') ?>/local-members/" style ="color: #1fb3dd; font-size: 12px; font-weight: normal;">&nbsp;click here.</a></hl>
  37.  
  38.  
  39.     <ul id="members-list" class="item-list row kleo-isotope masonry">
  40.  
  41.     <?php while ( bp_members() ) : bp_the_member(); ?>
  42.  
  43.         <li class="kleo-masonry-item">
  44.         <div class="member-inner-list animated animate-when-almost-visible bottom-to-top">
  45.         <div class="item-avatar rounded">
  46.           <a href="<?php bp_member_permalink(); ?>"><?php bp_member_avatar(); ?></a>
  47.           <?php do_action('bp_member_online_status', bp_get_member_user_id()); ?>
  48.         </div>
  49.  
  50.         <div class="item">
  51.           <div class="item-title">
  52.             <a href="<?php bp_member_permalink(); ?>"><?php bp_member_name(); ?></a>
  53.           </div>
  54.           <div class="item-meta"><span class="activity"><?php bp_member_last_active(); ?></span></div>
  55.          
  56.           <?php if ( bp_get_member_latest_update() ) : ?>
  57.             <span class="update"> <?php bp_member_latest_update(); ?></span>
  58.           <?php endif; ?>
  59.   <!-- addedbyval -->
  60.   <div id="xhome-place" class="item-meta">
  61. <?php global $bp, $wpdb;  $user_id = bp_get_member_user_id(); $xdata = get_user_meta($user_id, 'genre',true); $user_info = get_userdata( $user_id); $username = $user_info->user_login; $zdata = get_user_meta($user_id, 'homeplace',true);
  62.  if ($xdata  != network_site_url() ) {echo $zdata. "<br />"; $data = '<a href="'.$xdata.'members/'.$username.'/profile/'.'">Home Place Profile</a>'; echo $data; } ?></div>
  63. <div id ="xthisnetwork" class="item-meta"><?php $user_id = bp_get_member_user_id(); global $current_site; $user_info = get_userdata( $user_id); $username = $user_info->user_login; if ($current_site->id !== get_user_meta($user_id, 'primary_blog', true)) {  $var = site_url().'/members/'.$username.'/';  echo "<span><a href = '$var'>Activity on this Network</a></span>"; }?>
  64. </div>
  65.  
  66.          
  67.  
  68.           <?php do_action( 'bp_directory_members_item' ); ?>
  69.  
  70.           <?php
  71.            /***
  72.             * If you want to show specific profile fields here you can,
  73.             * but it'll add an extra query for each member in the loop
  74.             * (only one regardless of the number of fields you show):
  75.             *
  76.             * bp_member_profile_data( 'field=the field name' );
  77.             */
  78.           ?>
  79.         </div>
  80.  
  81.         <div class="action">
  82.  
  83.           <?php do_action( 'bp_directory_members_actions' ); ?>
  84.  
  85.         </div>
  86.  
  87.             </div><!--end member-inner-list-->
  88.         </li>
  89.  
  90.     <?php endwhile; ?>
  91.  
  92.     </ul>
  93.  
  94.     <?php do_action( 'bp_after_directory_members_list' ); ?>
  95.  
  96.     <?php bp_member_hidden_fields(); ?>
  97.  
  98.     <div id="pag-bottom" class="pagination">
  99.  
  100.         <div class="pag-count" id="member-dir-count-bottom">
  101.  
  102.             <?php bp_members_pagination_count(); ?>
  103.  
  104.         </div>
  105.  
  106.         <div class="pagination-links" id="member-dir-pag-bottom">
  107.  
  108.             <?php bp_members_pagination_links(); ?>
  109.  
  110.         </div>
  111.  
  112.     </div>
  113.  
  114. <?php else: ?>
  115.  
  116.     <div id="message" class="info">
  117.         <p><?php _e( "Sorry, no members were found.", 'buddypress' ); ?></p>
  118.     </div>
  119.  
  120. <?php endif; ?>
  121.  
  122. <?php do_action( 'bp_after_members_loop' ); ?>
RAW Paste Data Copied