Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php /* Querystring is set via AJAX in _inc/ajax.php - bp_dtheme_object_filter() */ ?>
- <?php do_action( 'bp_before_members_loop' ) ?>
- <?php if ( bp_has_members( bp_ajax_querystring( 'members' ) ) ) : ?>
- <div class="pagination">
- <div class="pag-count" id="member-dir-count">
- <?php bp_members_pagination_count() ?>
- </div>
- <div class="pagination-links" id="member-dir-pag">
- <?php bp_members_pagination_links() ?>
- </div>
- </div>
- <?php do_action( 'bp_before_directory_members_list' ) ?>
- <ul id="members-list" class="item-list">
- <?php while ( bp_members() ) : bp_the_member(); ?>
- <li class="member">
- <!-- <div class="item-avatar">
- <a href="<?php bp_member_permalink() ?>"><?php bp_member_avatar() ?></a>
- </div>-->
- <div class="item">
- <div class="item-title">
- <div> <div style="width: 25%; float: left;"><a href="<?php bp_member_permalink() ?>">
- <?php
- #Quick hack to make the surname display first. -ae
- $bpmembername = bp_get_member_name();
- $name = explode(" ", $bpmembername);
- $nameCount = count($name);
- $surname = $name[$nameCount-1];
- echo $surname . ", ";
- $i = 0;
- while ($i < ($nameCount-1)) {
- echo($name[$i] . " ");
- $i++;
- }
- ?>
- </a><br />
- </div>
- <?php
- /***
- * If you want to show specific profile fields here you can,
- * but it'll add an extra query for each member in the loop
- * (only one regadless of the number of fields you show):
- *
- * bp_member_profile_data( 'field=the field name' );
- */
- #Format Phone Numbers
- $phone = bp_get_member_profile_data('field=p:');
- $cell = bp_get_member_profile_data('field=f:');
- $formatted_phone = preg_replace("/[^\d]/", "", $phone);
- $formatted_cell = preg_replace("/[^\d]/", "", $cell);
- $thephone[3] = substr($formatted_phone, strlen($formatted_phone) - 4, 4);
- $thephone[2] = substr($formatted_phone, strlen($formatted_phone) - 7, 3);
- $thephone[1] = substr($formatted_phone, strlen($formatted_phone) - 10, 3);
- if (strlen($thephone) > 10) {
- $thephone[0] = substr($formatted_phone, strlen($formatted_phone) - 11, 1) . "."; }
- else {
- $thephone[0] = "";}
- $thecell[3] = substr($formatted_cell, strlen($formatted_cell) - 4, 4);
- $thecell[2] = substr($formatted_cell, strlen($formatted_cell) - 7, 3);
- $thecell[1] = substr($formatted_cell, strlen($formatted_cell) - 10, 3);
- $thecell[0] = substr($formatted_cell, strlen($formatted_cell) - 11, 1) . ".";
- if (strlen($thephone) > 10) {
- $thephone[0] = substr($formatted_phone, strlen($formatted_phone) - 11, 1) . "."; }
- else {
- $thephone[0] = "";}
- ?>
- <div style="width: 25%; float: left;"><a href="/members/?s=<?php bp_member_profile_data( 'field=Company' ); ?>"><?php bp_member_profile_data( 'field=Company' ); ?></a></div>
- <div style="width: 50%; float: left;"><?php echo($thephone[0].$thephone[1].".".$thephone[2].".".$thephone[3]); ?><br />
- <?php echo($thecell[0].$thecell[1].".".$thecell[2].".".$thecell[3]); ?><br />
- <a href="mailto:<?php bp_member_profile_data( 'field=e:' );?>"><?php bp_member_profile_data( 'field=e:' );?></a>
- </div>
- <br/>
- </div>
- </div>
- <?php if ( bp_get_member_latest_update() ) : ?>
- <span class="update"> - <?php bp_member_latest_update( 'length=10' ) ?></span>
- <?php endif; ?>
- </div>
- <div class="item-meta"><span class="activity"><?php bp_member_last_active() ?></span></div>
- <?php do_action( 'bp_directory_members_item' ) ?>
- <div class="action">
- <?php bp_member_add_friend_button() ?>
- <?php do_action( 'bp_directory_members_actions' ) ?>
- </div>
- <div class="clear"></div>
- </li>
- <?php endwhile; ?>
- </ul>
- <?php do_action( 'bp_after_directory_members_list' ) ?>
- <?php bp_member_hidden_fields() ?>
- <?php else: ?>
- <div id="message" class="info">
- <p><?php _e( "Sorry, no members were found.", 'buddypress' ) ?></p>
- </div>
- <?php endif; ?>
- <?php do_action( 'bp_after_members_loop' ) ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement