WordPress.org

Ready to get started?Download WordPress

Forums

RSVP ME
[resolved] Display User avatar (take it from logged in user that submits) (4 posts)

  1. Maartje_1992
    Member
    Posted 8 months ago #

    Hi,

    Your plugin is really great :)
    I use it on a website to let users with a diffrent role subscribe to events.
    I do this by hiding the form from normal visitors and show it to users with an 'alumnus' role.

    When subscribed the users will already be displayed in at the backend in the metabox.
    What I want is to display them on the front end.

    When A user RSVP'd, some info like fname and lname will be saved in the table wp_rsvp_me_respondents.

    I queried this and it returns the names.
    But I would like to have a picture to, the avatar from the user.

    So if a user is logged in and RSVP's to an event, is it possible to add all that persons data into the rsvp_me_respondents table?
    So it will also have the avatar.

    My code for looping on the front end is this btw (for users that search how to do that)

    <?php
    			global $wpdb;
    			$result = $wpdb->get_results( "SELECT * FROM wp_rsvp_me_respondents ");
    			//echo "<pre>"; print_r($result); echo "</pre>";
    
    			foreach($result as $row)
    			 {
    			echo '<div class="lid">';
    
    			$user_meta_picture = get_user_meta ($user->id, 'oa_social_login_user_picture', true);
    			echo '<img src='.$user_meta_picture.' />';
    
    			echo '<span>' . $row->fname . ' ' . $row->lname . '</span>';
    			echo '</p>';
    			echo '</div>';
    			}
    		?>

    Greets

    http://wordpress.org/plugins/rsvp-me/

  2. Maartje_1992
    Member
    Posted 8 months ago #

    BTW, the code I used displays all submitters, not only from the particular event

  3. MicahBlu
    Member
    Plugin Author

    Posted 8 months ago #

    Hi again, that is great feature idea...

    1. (Optionally) Show respondents on Front-End Event Pages
    2. Show their Avatars if they have them or Gravatar default

    I'm working on building add ons for RSVP Me.. These will most definitely be available and hopefully very soon.. I'll keep you posted!

    p.s the query returned all respondents because its missing a WHERE event_id=$event_id

    :)

  4. Maartje_1992
    Member
    Posted 7 months ago #

    Oke, great.
    The query is working now.
    Thank you
    :)

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.