• Ok, since the topics ( https://www.ads-software.com/support/topic/custom-edit-profile-page?replies=19 ) and ( https://www.ads-software.com/support/topic/plugin-user-photo-front-end-upload ) I needed to fix the uploading image for my custom template… I used “jimzqui’s” code and then needed to tweak a few things…

    I added the following functions into the template directly within the logic that processes the form after “do_action(‘personal_options_update’)”.

    function edit_user_profile_update( $user_id ) {… }

    function avatar_delete( $user_id ) {… }

    I added the

    I couldn’t get the nonce thing to work so I changed this line (this will be a security issue)…

    if ( !isset( $_POST[ ‘_simple_local_avatar_nonce’ ] ) || !wp_verify_nonce( $_POST[ ‘_simple_local_avatar_nonce’ ], ‘simple_local_avatar_nonce’ ) ) { //security

    to this

    if ( !isset( $_POST[ ‘_simple_local_avatar_nonce’ ] ) ){ //security

    In the form I put this code…

    <tr>
    <th><?php echo get_avatar(intval($user_ID));?>

    <label for=”simple-local-avatar”><?php _e(‘Photo’,’cp’) ?></label></th>
    <td><input type=”file” name=”simple-local-avatar” id=”simple-local-avatar” /></td>
    </tr>

    Ok well it worked… good luck!

    https://www.ads-software.com/extend/plugins/simple-local-avatars/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Simple Local Avatars] Fix for image upload…’ is closed to new replies.