Changeset 3232 for trunk/bp-core/bp-core-templatetags.php
- Timestamp:
- 09/06/2010 04:24:57 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-templatetags.php
r2950 r3232 27 27 if ( isset( $_REQUEST['letter'] ) && '' != $_REQUEST['letter'] ) { 28 28 $this->members = BP_Core_User::get_users_by_letter( $_REQUEST['letter'], $this->pag_num, $this->pag_page, $populate_extras ); 29 } else { 30 $this->members = bp_core_get_users( array( 'type' => $this->type, 'per_page' => $this->pag_num, 'page' => $this->pag_page, 'user_id' => $user_id, 'include' => $include, 'search_terms' => $search_terms, 'populate_extras' => $populate_extras ) ); 29 } 30 else if ( false !== $include ) { 31 $this->members = BP_Core_User::get_specific_users( $include, $this->pag_num, $this->pag_page, $populate_extras ); 32 } 33 else { 34 $this->members = bp_core_get_users( array( 'type' => $this->type, 'per_page' => $this->pag_num, 'page' => $this->pag_page, 'user_id' => $user_id, 'search_terms' => $search_terms, 'populate_extras' => $populate_extras ) ); 31 35 } 32 36 … … 160 164 161 165 $members_template = new BP_Core_Members_Template( $type, $page, $per_page, $max, $user_id, $search_terms, $include, (bool)$populate_extras ); 162 return apply_filters( 'bp_has_members', $members_template->has_members(), &$members_template ); 166 167 return $members_template->has_members(); 163 168 } 164 169 … … 312 317 313 318 // Populate the user if it hasn't been already. 314 if ( empty( $members_template->member->profile_data ) && method_exists( 'BP_XProfile_ProfileData', 'get_all_for_user' ))315 $members_template->member ->profile_data = BP_XProfile_ProfileData::get_all_for_user( $members_template->member->id );319 if ( empty( $members_template->member->profile_data ) ) 320 $members_template->member = new BP_Core_User( $members_template->member->id ); 316 321 317 322 $data = xprofile_format_profile_field( $members_template->member->profile_data[$field]['field_type'], $members_template->member->profile_data[$field]['field_data'] ); … … 676 681 function bp_is_home() { return bp_is_my_profile(); } 677 682 683 function bp_get_loggedin_user_link() { 684 global $bp; 685 686 return $bp->loggedin_user->domain; 687 } 688 689 function bp_get_displayed_user_link() { 690 global $bp; 691 692 return $bp->displayed_user->domain; 693 } 694 678 695 function bp_last_activity( $user_id = false, $echo = true ) { 679 696 global $bp; … … 690 707 } 691 708 692 function bp_user_firstname( $name = false) {693 echo bp_get_user_firstname( $name);709 function bp_user_firstname() { 710 echo bp_get_user_firstname(); 694 711 } 695 712 function bp_get_user_firstname( $name = false ) { … … 708 725 709 726 echo apply_filters( 'bp_the_avatar_thumbnail', $bp->displayed_user->domain ); 710 }711 712 function bp_get_loggedin_user_link() {713 global $bp;714 715 return $bp->loggedin_user->domain;716 }717 718 function bp_get_displayed_user_link() {719 global $bp;720 721 return $bp->displayed_user->domain;722 727 } 723 728 … … 919 924 } else if ( bp_is_activation_page() ) { 920 925 $title = __( 'Activate your Account', 'buddypress' ); 921 922 } else if ( bp_is_group_create() ) {923 $title = __( 'Create a Group', 'buddypress' );924 925 } else if ( bp_is_create_blog() ) {926 $title = __( 'Create a Blog', 'buddypress' );927 926 } 928 927 … … 990 989 991 990 function bp_search_form_type_select() { 992 global $bp;993 994 991 // Eventually this won't be needed and a page will be built to integrate all search results. 995 992 $selection_box = '<select name="search-which" id="search-which" style="width: auto">'; … … 1180 1177 1181 1178 function bp_signup_avatar( $args = '' ) { 1182 echo bp_get_signup_avatar( $args = '');1179 echo bp_get_signup_avatar( $args ); 1183 1180 } 1184 1181 function bp_get_signup_avatar( $args = '' ) { … … 1206 1203 1207 1204 $gravatar_url = apply_filters( 'bp_gravatar_url', 'http://www.gravatar.com/avatar/' ); 1208 return apply_filters( 'bp_get_signup_avatar', '<img src="' . $gravatar_url . md5( $_POST['signup_email'] ) . '?d=' . $default_grav . '&s=' . $size ). '" width="' . $size . '" height="' . $size . '" alt="' . $alt . '" class="' . $class . '" />';1205 $gravatar_img = '<img src="' . $gravatar_url . md5( strtolower( $_POST['signup_email'] ) ) . '?d=' . $default_grav . '&s=' . $size . '" width="' . $size . '" height="' . $size . '" alt="' . $alt . '" class="' . $class . '" />'; 1209 1206 } else { 1210 return apply_filters( 'bp_get_signup_avatar', bp_core_fetch_avatar( array( 'item_id' => $signup_avatar_dir, 'object' => 'signup', 'avatar_dir' => 'avatars/signups', 'type' => 'full', 'width' => $size, 'height' => $size, 'alt' => $alt, 'class' => $class )) );1207 $gravatar_img = bp_core_fetch_avatar( array( 'item_id' => $signup_avatar_dir, 'object' => 'signup', 'avatar_dir' => 'avatars/signups', 'type' => 'full', 'width' => $size, 'height' => $size, 'alt' => $alt, 'class' => $class ) ); 1211 1208 } 1209 1210 return apply_filters( 'bp_get_signup_avatar', $gravatar_img ); 1212 1211 } 1213 1212 … … 1251 1250 1252 1251 function bp_registration_needs_activation() { 1253 return apply_filters( 'bp_registration_needs_activation', true);1252 return apply_filters( 'bp_registration_needs_activation', bp_core_is_multisite() ); 1254 1253 } 1255 1254
Note: See TracChangeset
for help on using the changeset viewer.