Show
Ignore:
Timestamp:
06/19/08 17:10:30 (7 months ago)
Author:
apeatling
Message:

Fixed issues with subdirectory WPMU installations and BuddyPress

Files:
1 modified

Legend:

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

    r166 r167  
    210210 
    211211function bp_the_avatar() { 
    212         global $coreuser_id; 
    213         echo xprofile_get_avatar( $coreuser_id, 2 ); 
     212        global $current_userid; 
     213        echo xprofile_get_avatar( $current_userid, 2 ); 
    214214} 
    215215 
    216216function bp_the_avatar_thumbnail() { 
    217         global $coreuser_id; 
    218         echo xprofile_get_avatar( $coreuser_id, 1 ); 
     217        global $current_userid; 
     218        echo xprofile_get_avatar( $current_userid, 1 ); 
    219219} 
    220220 
    221221function bp_loggedinuser_avatar_thumbnail() { 
    222         global $current_user; 
    223         echo xprofile_get_avatar( $current_user->ID, 1 ); 
     222        global $loggedin_userid; 
     223        echo xprofile_get_avatar( $loggedin_userid, 1 ); 
    224224} 
    225225 
    226226function bp_user_fullname($user_id = false) { 
    227         global $coreuser_id; 
     227        global $current_userid; 
    228228         
    229229        if ( !$user_id ) 
    230                 $user_id = $coreuser_id; 
     230                $user_id = $current_userid; 
    231231         
    232232        $data = bp_get_field_data( array( 'First Name', 'Last Name' ) ); 
     
    248248 
    249249function bp_profile_group_tabs() { 
    250         global $source_domain, $bp_xprofile_slug, $group_name; 
     250        global $loggedin_domain, $bp_xprofile_slug, $group_name; 
    251251         
    252252        $groups = BP_XProfile_Group::get_all(); 
     
    262262                } 
    263263 
    264                 echo '<li' . $selected . '><a href="' . $source_domain . $bp_xprofile_slug . '/edit/group/' . $groups[$i]->id . '">' . $groups[$i]->name . '</a></li>'; 
     264                echo '<li' . $selected . '><a href="' . $loggedin_domain . $bp_xprofile_slug . '/edit/group/' . $groups[$i]->id . '">' . $groups[$i]->name . '</a></li>'; 
    265265        } 
    266266} 
     
    284284 
    285285function bp_edit_profile_form() { 
    286         global $action_variables, $source_domain, $bp_xprofile_slug; 
     286        global $action_variables, $loggedin_domain, $bp_xprofile_slug; 
    287287 
    288288        $group_id = $action_variables[1]; 
     
    291291                $group_id = 1; // 'Basic' group. 
    292292         
    293         xprofile_edit( $group_id, $source_domain . $bp_xprofile_slug . '/edit/group/' . $group_id . '/?mode=save' ); 
    294 } 
    295  
    296  
     293        xprofile_edit( $group_id, $loggedin_domain . $bp_xprofile_slug . '/edit/group/' . $group_id . '/?mode=save' ); 
     294} 
     295 
     296function bp_avatar_upload_form() { 
     297        global $loggedin_domain, $bp_xprofile_slug; 
     298          
     299        xprofile_avatar_admin(null, $loggedin_domain . $bp_xprofile_slug . '/change-avatar/'); 
     300} 
    297301 
    298302