Skip to:
Content
Pages
Categories
Search
Top
Bottom

Custom avatar upload


  • Mat Pinheiro
    Participant

    @mateuspinheiro

    I’m creating a buddypress theme fom zero, so i rewriting almost everything.

    It have been ok until now, but i’m stucked in avatar upload.

    I’ve been reading the core to learn how to upload this avatars. I’ve found bp_core_avatar_handle_upload() and tryed to use that this way:

    bp_core_avatar_handle_upload( $_FILES, ‘xprofile_avatar_upload_dir’ ) — $_FILES comes from a form, which code is bellow

    <form action=”” method=”post” id=”avatar-upload-form” enctype=”multipart/form-data”>
    <p id=”avatar-upload”>
    <input type=”file” name=”file” id=”file” />
    <input type=”submit” name=”upload” id=”upload” value=”” />
    <input type=”hidden” name=”action” id=”action” value=”bp_avatar_upload” />
    </p>

    < /form>

    Any ideas?

  • The topic ‘Custom avatar upload’ is closed to new replies.
Skip to toolbar