Home Forums Plugin Support WP User Frontend Pro Buddpress Addon – display Image Uploads in member area.

This topic is: not resolved

This topic contains 8 replies, has 2 voices, and was last updated by  Sekander Badsha 4 years, 6 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #30658

    Aaron
    Member
    Post count: 39

    The Page in question: http://aaronkine.staging.wpengine.com/members/aarongrafix/

    I have setup 3 image upload fields on the Registration Page. They show up in the Admin Users Profile… but how do i display them in Front End Profile Page (link above to sample page)? The file i need to edit is ‘member-header.php'.. I have also tried editing ‘functions.php' as explained below.

    I have tried many different codes that i found in your support forms but nothing works:
    I have checked the uploads folder and the images are successfully being uploaded to:
    …wp-content/uploads/2014/11/name_of_image.jpg.

    Each Image upload Field is labled as OrgImage1, OrgIage2, and OrgImage3
    I am using WP User Frontend PRO Ver. 2.2.6 and the Addon – BuddyPress Profile Ver. 0.2

    Codes i have tried:

    if ( isset( $_GET['OrgImage1'] ) ) {
        $curauth = get_userdatabylogin( $author_name );
    } else {
        $curauth = get_userdata( intval( $author ) );
    }
    if ( isset( $_GET['OrgImage1'] ) ) {
        $curauth = get_userdatabylogin( $author_name );
    } else {
        $curauth = get_userdata( intval( $author ) );
    }

    ________________________________________________________________
    ALSO This…

    <img src="http://aaronkine.staging.wpengine.com/wp-content/uploads/<?php bp_member_profile_data('field=OrgImage1');  ?>" /> 
    

    ________________________________________________________________
    And this in my ‘functions.php'

    function org_images () { ?>
    <img height="100px" width="100px" src="http://aaronkine.staging.wpengine.com/wp-content/uploads/2014/11/<?php bp_member_profile_data('field=OrgImage1'); ?>" />
    <?php bp_member_profile_data('field=OrgImage1') ?>
    <?php echo bp_member_profile_data('field=OrgImage1') ?>
    
    <?php }
    add_action('bp_before_member_header','org_images');
    

    NOTHING WORKS PLEASE HELP!

    Thanks, I am happy to give you Admin Access to my site.

    #31076

    Sekander Badsha
    Member
    Post count: 2067

    Hello Aron,

    You do not need to apply any code. You just need to navigate to wp-admin -> User Frontend -> Settings -> Login/Register and assign the forms according to the user role. If you want to use the same for every user role, you can assign the same page for every role. And this will work in both back and front.

    Let me know if you feel any difficulties..

    Thank you ๐Ÿ™‚

    #31555

    Aaron
    Member
    Post count: 39

    I have already assigned the Forms correctly. The problem is when creating the Registration Form i add the “Image Upload” field in the form… then click on the “Buddypress Tab” to try and MAP the field to the Buddypress profile… but the “Image Upload” field does now show up in order to map. Ultimately I want the 3 Image Uploads on my Registration form to show up in each users Buddypress Profile page.

    Also, I have correctly setup the 3 image upload fields in the Buddypress Profile in order to map them.

    See my images to help explain.

    Form Editor page
    Buddypress Addon Settings
    Registration Form
    Buddypress Profile

    #31832

    Sekander Badsha
    Member
    Post count: 2067

    Hello Aron,

    There no feature to add images in BuddyPress registration field. So it will not integrate with BuddyPress.

    #32063

    Aaron
    Member
    Post count: 39

    OK. Understood. What if (after they register and login) i create a separate “image upload” form on their profile page… Then they can upload image… but how do i set the Form to upload the Image for that Specific Users ID… and how can i display it on their Profile Page???

    #32079

    Sekander Badsha
    Member
    Post count: 2067

    Anyone does anything in any CMS is dynamically managed and automatically assigned to that particular user. So no need to worry about assigning a file or anything to any user or get tensed about the “User ID”.

    You can put avatar for profile image and image upload fields for other images in the registration page.

    ๐Ÿ™‚

    #32101

    Aaron
    Member
    Post count: 39

    Ok I have the Image Upload field working and the file gets uploaded to my Uploads Folder.

    Now how do i display that image in the users profile page?
    Same question worded differently — What is the Code to Display the uploaded image for that specific user?

    NOTE: I ONLY want to show the Images uploaded using the Registration Form.

    I know i would use this code on the Users Profile Page “bp_displayed_user_id()” but then whats the code to show the images uploaded using the Registration Form for this user?

    Thanks

    #32107

    Aaron
    Member
    Post count: 39

    OK I'm getting closer…. All i need to know now is how to ONLY show images uploaded using the Registration Form.

    Here is my code that shows all of the users uploaded images

            $pictures = new WP_Query( array( 'author' => bp_displayed_user_id(), 'post_type' => 'attachment', 'post_status' => 'inheret', 'posts_per_page' => -1 ) );
            echo '<li><h3>' . $user->user_nicename . '</h3>';
                if ( $pictures->posts ) :
                    echo '<ul>';
                    foreach ( $pictures->posts as $picture ) :
                        echo '<li>'. wp_get_attachment_image( $picture->ID ) .'</li>';              
                    endforeach;
                    echo '</ul>';
                endif;
            echo '</li>';
    
    #32131

    Sekander Badsha
    Member
    Post count: 2067

    Please see my previous reply #31076

Viewing 9 posts - 1 through 9 (of 9 total)

The topic ‘Buddpress Addon – display Image Uploads in member area.’ is closed to new replies.