Advertisement
Guest User

Nick Watson

a guest
Jan 27th, 2010
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.75 KB | None | 0 0
  1. <?php if ( function_exists('xprofile_get_profile') ) : ?>
  2.  
  3.     <?php if ( bp_has_profile() ) : ?>
  4.  
  5.         <?php while ( bp_profile_groups() ) : bp_the_profile_group(); ?>
  6.  
  7.             <?php if ( bp_profile_group_has_fields() ) : ?>
  8.  
  9.                 <?php do_action( 'bp_before_profile_field_content' ) ?>
  10.  
  11.                 <div class="bp-widget <?php bp_the_profile_group_slug() ?>">
  12.                     <h4><?php bp_the_profile_group_name() ?></h4>
  13.  
  14.                     <table class="profile-fields">
  15.                         <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?>
  16.  
  17.  
  18.                         <!-- this is where i've added the code -->
  19.                             <?php if ( bp_get_the_profile_field_name() == 'Gender' ) {
  20.                                 if ( bp_get_the_profile_field_value() == 'Male' )
  21.                                 echo '<img src="male.jpg" alt="male" title="Male" />';
  22.                             }
  23.                             ?>
  24.  
  25.                             <?php if ( bp_field_has_data() ) : ?>
  26.                                 <tr<?php bp_field_css_class() ?>>
  27.  
  28.                                     <td class="label">
  29.                                         <?php bp_the_profile_field_name() ?>
  30.                                     </td>
  31.                                     <td class="data">
  32.                                         <?php bp_the_profile_field_value() ?>
  33.                                     </td>
  34.  
  35.                                 </tr>
  36.                             <?php endif; ?>
  37.  
  38.                             <?php do_action( 'bp_profile_field_item' ) ?>
  39.  
  40.                         <?php endwhile; ?>
  41.                     </table>
  42.                 </div>
  43.  
  44.                 <?php do_action( 'bp_after_profile_field_content' ) ?>
  45.  
  46.             <?php endif; ?>
  47.  
  48.         <?php endwhile; ?>
  49.  
  50.         <div class="button-block">
  51.             <?php if ( bp_is_home() || is_site_admin() ) : ?>
  52.  
  53.                 <?php bp_edit_profile_button() ?>
  54.  
  55.             <?php endif; ?>
  56.  
  57.             <?php do_action( 'bp_profile_field_buttons' ) ?>
  58.         </div>
  59.  
  60.     <?php else: ?>
  61.  
  62.         <div id="message" class="info">
  63.             <p><?php _e( 'Sorry, this person does not have a public profile.', 'buddypress' ) ?></p>
  64.         </div>
  65.  
  66.     <?php endif;?>
  67.  
  68. <?php else : ?>
  69.  
  70.     <?php bp_core_get_wp_profile() ?>
  71.  
  72. <?php endif; ?>
  73.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement