Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/12/2010 01:03:42 PM (17 years ago)
Author:
apeatling
Message:

Merging 1.2 branch with trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-templatetags.php

    r2822 r2842  
    310310
    311311                // Populate the user if it hasn't been already.
    312                 if ( empty( $members_template->member->profile_data ) )
    313                         $members_template->member = new BP_Core_User( $members_template->member->id );
     312                if ( empty( $members_template->member->profile_data ) && method_exists( 'BP_XProfile_ProfileData', 'get_all_for_user' ) )
     313                        $members_template->member->profile_data = BP_XProfile_ProfileData::get_all_for_user( $members_template->member->id );
    314314
    315315                $data = xprofile_format_profile_field( $members_template->member->profile_data[$field]['field_type'], $members_template->member->profile_data[$field]['field_data'] );
    … …  
    917917        } else if ( bp_is_activation_page() ) {
    918918                $title = __( 'Activate your Account', 'buddypress' );
     919
     920        } else if ( bp_is_group_create() ) {
     921                $title = __( 'Create a Group', 'buddypress' );
     922
     923        } else if ( bp_is_create_blog() ) {
     924                $title = __( 'Create a Blog', 'buddypress' );
    919925        }
    920926
    … …  
    11841190                extract( $r, EXTR_SKIP );
    11851191
    1186                 if ( !bp_core_is_multisite() && !empty( $_POST['signup_username'] ) ) {
    1187                         $user_id = bp_core_get_userid( $_POST['signup_username'] );
    1188                         return apply_filters( 'bp_get_signup_avatar', bp_core_fetch_avatar( array( 'item_id' => $user_id, 'type' => 'full', 'width' => $size, 'height' => $size, 'alt' => $alt, 'class' => $class ) ) );
     1192                $signup_avatar_dir = ( !empty( $_POST['signup_avatar_dir'] ) ) ? $_POST['signup_avatar_dir'] : $bp->signup->avatar_dir;
     1193
     1194                if ( empty( $signup_avatar_dir ) ) {
     1195                        if ( empty( $bp->grav_default->user ) ) {
     1196                                $default_grav = 'wavatar';
     1197                        } else if ( 'mystery' == $bp->grav_default->user ) {
     1198                                $default_grav = BP_PLUGIN_URL . '/bp-core/images/mystery-man.jpg';
     1199                        } else {
     1200                                $default_grav = $bp->grav_default->user;
     1201                        }
     1202
     1203                        $gravatar_url = apply_filters( 'bp_gravatar_url', 'http://www.gravatar.com/avatar/' );
     1204                        return apply_filters( 'bp_get_signup_avatar', '<img src="' . $gravatar_url . md5( $_POST['signup_email'] ) . '?d=' . $default_grav . '&amp;s=' . $size ) . '" width="' . $size . '" height="' . $size . '" alt="' . $alt . '" class="' . $class . '" />';
    11891205                } else {
    1190                         $signup_avatar_dir = ( !empty( $_POST['signup_avatar_dir'] ) ) ? $_POST['signup_avatar_dir'] : $bp->signup->avatar_dir;
    1191 
    1192                         if ( empty( $signup_avatar_dir ) ) {
    1193                                 if ( empty( $bp->grav_default->user ) ) {
    1194                                         $default_grav = 'wavatar';
    1195                                 } else if ( 'mystery' == $bp->grav_default->user ) {
    1196                                         $default_grav = BP_PLUGIN_URL . '/bp-core/images/mystery-man.jpg';
    1197                                 } else {
    1198                                         $default_grav = $bp->grav_default->user;
    1199                                 }
    1200 
    1201                                 $gravatar_url = apply_filters( 'bp_gravatar_url', 'http://www.gravatar.com/avatar/' );
    1202                                 return apply_filters( 'bp_get_signup_avatar', '<img src="' . $gravatar_url . md5( $_POST['signup_email'] ) . '?d=' . $default_grav . '&amp;s=' . $size ) . '" width="' . $size . '" height="' . $size . '" alt="' . $alt . '" class="' . $class . '" />';
    1203                         } else {
    1204                                 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 ) ) );
    1205                         }
     1206                        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 ) ) );
    12061207                }
    12071208        }
    … …  
    12461247
    12471248function bp_registration_needs_activation() {
    1248         return apply_filters( 'bp_registration_needs_activation', bp_core_is_multisite() );
     1249        return apply_filters( 'bp_registration_needs_activation', true );
    12491250}
    12501251
Note: See TracChangeset for help on using the changeset viewer.