Changeset 394 for trunk/bp-xprofile/bp-xprofile-templatetags.php
- Timestamp:
- 10/23/2008 12:56:37 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/bp-xprofile/bp-xprofile-templatetags.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-xprofile/bp-xprofile-templatetags.php
r391 r394 133 133 134 134 // Begin template tags: 135 function xprofile_get_profile() { 136 load_template( TEMPLATEPATH . '/profile/profile-loop.php'); 137 } 135 138 136 139 function bp_has_profile() { 137 140 global $bp, $profile_template; 138 141 139 142 $profile_template = new BP_XProfile_Template($bp['current_userid']); 140 143 … … 222 225 } 223 226 224 function bp_the_avatar() {225 global $bp;226 echo bp_core_get_avatar( $bp['current_userid'], 2 );227 }228 229 function bp_the_avatar_thumbnail() {230 global $bp;231 echo bp_core_get_avatar( $bp['current_userid'], 1 );232 }233 234 function bp_loggedinuser_avatar_thumbnail( $width = false, $height = false ) {235 global $bp;236 237 if ( $width && $height )238 echo bp_core_get_avatar( $bp['loggedin_userid'], 1, false, $width, $height );239 else240 echo bp_core_get_avatar( $bp['loggedin_userid'], 1 );241 }242 243 function bp_fetch_user_fullname( $user_id = false, $echo = true ) {244 global $bp;245 246 if ( !$user_id )247 $user_id = $bp['current_userid'];248 249 $data = bp_get_field_data( array( 'First Name', 'Last Name' ), $user_id );250 251 if ( $echo )252 echo ucfirst($data['First Name']) . ' ' . ucfirst($data['Last Name']);253 else254 return ucfirst($data['First Name']) . ' ' . ucfirst($data['Last Name']);255 }256 257 227 function bp_get_field_data( $field, $user_id = null ) { 258 228 return BP_XProfile_ProfileData::get_value_byfieldname( $field, $user_id ); 259 }260 261 function bp_user_link() {262 echo '';263 }264 265 function bp_user_status() {266 // TODO: dummy function now, until status component is developed.267 return false;268 229 } 269 230 … … 321 282 } 322 283 323 function bp_profile_last_updated_date( $user_id = false, $echo = true ) {324 global $bp;325 326 if ( !$user_id )327 $user_id = $bp['current_userid'];328 329 $last_updated = BP_XProfile_ProfileData::get_last_updated( $user_id );330 331 if ( $echo )332 echo $last_updated;333 else334 return $last_updated;335 }336 337 284 function bp_profile_last_updated() { 338 285 global $bp;
Note: See TracChangeset
for help on using the changeset viewer.