Skip to:
Content
Pages
Categories
Search
Top
Bottom

A very problem with avatar, please!!

  • I want the users profile tab disappears but the option to change avatar aparezca en otra pagina distinta del perfil de usuario. In profile form of the “theme my login plugin”.

    <?php

    $GLOBALS = $current_user = wp_get_current_user();
    $GLOBALS = $profileuser = get_user_to_edit( $current_user->ID );

    $user_can_edit = false;
    foreach ( array( ‘posts’, ‘pages’ ) as $post_cap )
    $user_can_edit |= current_user_can( “edit_$post_cap” );
    ?>

    <div class="login profile" id="theme-my-loginthe_instance(); ?>”>
    the_action_template_message( ‘profile’ ); ?>
    the_errors(); ?>

    ID ) ?>

    <input type="hidden" name="checkuser_id" value="ID; ?>” />

    <input type="text" name="user_login" id="user_login" value="user_login ); ?>” disabled=”disabled” class=”regular-text” />
    <input type="text" name="first_name" id="first_name" value="first_name ) ?>” class=”regular-text” />
    <input type="text" name="last_name" id="last_name" value="last_name ) ?>” class=”regular-text” />
    <input type="text" name="nickname" id="nickname" value="nickname ) ?>” class=”regular-text” />

    <?php
    $public_display = array();
    $public_display = $profileuser->nickname;
    $public_display = $profileuser->user_login;
    if ( !empty( $profileuser->first_name ) )
    $public_display = $profileuser->first_name;
    if ( !empty( $profileuser->last_name ) )
    $public_display = $profileuser->last_name;
    if ( !empty( $profileuser->first_name ) && !empty( $profileuser->last_name ) ) {
    $public_display = $profileuser->first_name . ‘ ‘ . $profileuser->last_name;
    $public_display = $profileuser->last_name . ‘ ‘ . $profileuser->first_name;
    }
    if ( !in_array( $profileuser->display_name, $public_display ) )// Only add this if it isn’t duplicated elsewhere
    $public_display = array( ‘display_displayname’ => $profileuser->display_name ) + $public_display;
    $public_display = array_map( ‘trim’, $public_display );
    foreach ( $public_display as $id => $item ) {
    $selected = ( $profileuser->display_name == $item ) ? ‘ selected=”selected”‘ : ”;
    ?>
    <option id="” value=””>

    <input type="text" name="email" id="email" value="user_email ) ?>” class=”regular-text” />
    <input type="text" name="url" id="url" value="user_url ) ?>” class=”regular-text code” />

    <?php
    $show_password_fields = apply_filters( ‘show_password_fields’, true, $profileuser );
    if ( $show_password_fields ) :
    ?>

    <?php
    do_action( ‘show_user_profile’, $profileuser );
    ?>

    caps ) > count( $profileuser->roles ) && apply_filters( ‘additional_capabilities_display’, true, $profileuser ) ) { ?>

    <?php
    $output = ”;
    global $wp_roles;
    foreach ( $profileuser->caps as $cap => $value ) {
    if ( !$wp_roles->is_role( $cap ) ) {
    if ( $output != ” )
    $output .= ‘, ‘;
    $output .= $value ? $cap : “Denied: {$cap}”;
    }
    }
    echo $output;
    ?>

    <input type="hidden" name="user_id" id="user_id" value="ID ); ?>” />
    <input type="submit" class="button-primary" value="” name=”submit” />

    This code has to work in the code above:

    <?php _e( 'Your avatar will be used on your profile and throughout the site. If there is a Gravatar associated with your account email we will use that, or you can upload an image from your computer.’, ‘buddypress’) ?>

    <input type="submit" name="upload" id="upload" value="” />

    <a class="button edit" href="” title=””>

    <img src="” id=”avatar-to-crop” class=”avatar” alt=”” />

    <img src="” id=”avatar-crop-preview” class=”avatar” alt=”” />

    <input type="submit" name="avatar-crop-submit" id="avatar-crop-submit" value="” />

    <input type="hidden" name="image_src" id="image_src" value="” />

    <?php _e( 'Your avatar will be used on your profile and throughout the site. To change your avatar, please create an account with Gravatar using the same email address as you used to register with this site.’, ‘buddypress’ ) ?>

    How?

Viewing 10 replies - 1 through 10 (of 10 total)
  • And this is a forum? no answer

    I want the users profile tab Disappears option to change But the avatar appears on another page than the user profile. In profile form of the “theme my login plugin”.


    @mercime
    Keymaster

    @mercime

    == And this is a forum? no answer ==
    Know that 99.9% of those who help out here are volunteers living in different time zones.

    Also, something is getting lost in translation. What exactly do you want to do? As far as I can gather from your posts, you want to move the avatar upload page into the user’s profile page, and that you want that page to be presented like the “theme my login plugin” options page? If that’s the case, it would be a rather complicated process and there’ s no plugin for what you want.

    Thanks for answering.
    What I want is that you can change the avatar from another site. I prefer it to be in the plugin “theme my login”.


    @mercime
    Keymaster

    @mercime

    == What I want is that you can change the avatar from another site. ==
    If your users have accounts with Gravatar.com (another site), the avatar will automatically appear in their user profiles.

    == I prefer it to be in the plugin “theme my login”. ==
    You’d have to ask plugin author if he could make Theme My login plugin compatible with BuddyPress which is not exactly easy.

    Thanks for answering. I’ll ask the author of the plugin, but can not move the tab to change avatar to another part of the web?

    I am just asking here, since I am wondering a lot here. Why do you want the changing of profile avatar, to be in the “theme my login” plugin?

    because in BuddyPress is bad


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    because in BuddyPress is bad

    I don’t think it is. :)

    No, sorry sorry
    I mean how to organize the tabs is not the best, it should be possible to choose easily.

    It’s a great plugin

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘A very problem with avatar, please!!’ is closed to new replies.
Skip to toolbar