Support » Plugin: Simple Local Avatars » [Plugin: Simple Local Avatars] Front End – Not showing up

  • The avatar upload is not showing up on the front end user edit screens. I used the code below to get it to show up:

    <?php
    $myAv = new simple_local_avatars();
    $myAv->edit_user_profile($profileuser);
    ?>

    It shows up, but doesn’t show the current avatar (uploaded in back end) and when submitted it doesn’t actually upload anything.

    Is there a way to get this working on the front end?

    http://wordpress.org/extend/plugins/simple-local-avatars/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Abu

    (@absikandar)

    I am facing same issue as well.

    Florence said :

    Here’s how I did it:

    Instal Simple Local Avatars

    Install this plugin http://wordpress.org/extend/plugins/php-code-for-posts/

    Add a new shortcode and enter this code:

    <?php get_header();
    global $user_ID;
    if ($user_ID) {
    $user_info = get_userdata($user_ID);
    $id = $user_info->ID;
    }
     ?>
    
    <?php if(isset($_POST['user_avatar_edit_submit']))
          {
               do_action('edit_user_profile_update', $id);
          }
    ?>
    
    <form id="your-profile" action="" method="post">
        <?php
        $myAv = new simple_local_avatars();
        $myAv->edit_user_profile($user_info);
        ?>
        <input type="submit" name="user_avatar_edit_submit" value="OK"/>
    </form>

    Copy and paste the shortcode onto a page and voilla! There’s your front-end avatar uploader!

    You need to make sure you include enctype="multipart/form-data" or the form will not upload an image on most servers, it will only send $_POST data, not $_FILES data.

    So the form open should be:

    <form id="your-profile" action="" method="post" enctype="multipart/form-data">

    Very useful, thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Simple Local Avatars] Front End – Not showing up’ is closed to new replies.