Support

Home Forums Event Espresso Premium Front end attendee list EE4

Front end attendee list EE4

Posted: May 15, 2015 at 2:37 pm

Viewing 11 reply threads


Joost

May 15, 2015 at 2:37 pm

I have two follow-up questions on this closed topic:
https://eventespresso.com/topic/front-end-attendee-list-page-ee4/

This works quit well (although I had to remove the double quotes from the event ID) but:
1) Is there documentation for more filter options? For instance, I have quite a few approved but trashed test registration that I want to filter out
2) We also ask additinal registration info (such as age and gender). How can I list this information as well?

Thanks,

Joost


Lorenzo Orlando Caum

  • Support Staff

May 15, 2015 at 4:49 pm

Hi, that is based on some sample coding written by a team member. It does not have any parameters for changing the options at this time.


Lorenzo


Joost

May 16, 2015 at 7:59 am

Hi Lorenzo,

Thanks for your quick reply. I understand. I can live without further filter options.

But how can I output the answers to the additional questions? My guess is that would be adding just a line of code.

Thanks

Joost


Joost

May 21, 2015 at 6:07 am

I guess I’m spoiled by the usually impeccable 24 hour response ๐Ÿ˜‰ but would you have an anwser to my question above. Perhaps it’s trivial and in that case a pointer would be appreciated.

Thanks,

Joost


Dean

May 21, 2015 at 6:32 am

Hi Joost,

Sorry for the delay in responding.

Looking at it, it might be a single line of code or a block of code.

You would need to change the SQL command to basically pull in another database table (or two) containing the attendees answers, as these are stored separately.

It might be easier (but slower), the add an SQL request in the foreach to query the esp_answer database for the answers.

Something like:

add_shortcode('display_those_attendees', 'ee_attendee_list' );
  
function ee_attendee_list($atts){
    global $wpdb, $post;
 
$EVT_ID = $atts['eventid'];
$post = get_post( $EVT_ID );   
 
        echo '<ul class="attendee-list">';
     
        $sql = "SELECT * ";
        $sql .= "FROM {$wpdb->prefix}esp_attendee_meta ";
        $sql .= "INNER JOIN {$wpdb->prefix}esp_registration ";
        $sql .= "ON {$wpdb->prefix}esp_attendee_meta.ATT_ID = {$wpdb->prefix}esp_registration.ATT_ID ";
        $sql .= "WHERE {$wpdb->prefix}esp_registration.EVT_ID = %d";
         
        $attendees = $wpdb->get_results( $wpdb->prepare( $sql, $post->ID ));
 
        foreach($attendees as $attendee){
          
            $REG_ID = $attendee->REG_ID;
            $sql2 = "SELECT * FROM {$wpdb->prefix}esp_answer WHERE REG_ID = %d";
            $answers = $wpdb->get_results( $wpdb->prepare( $sql2, $REG_ID ));
            echo "<pre>" . print_r( $answers, 1 ) . "</pre>"; 

            $fname = $attendee->ATT_fname;
            $lname = $attendee->ATT_lname;
            $email = $attendee->ATT_email;
            $gravatar = get_avatar( $email, '64', 'identicon' );
            $html = '<li>'. $gravatar .'<span>'. $fname .' '. $lname . '</span></li>';
            echo $html;
        }
     
        echo '</ul>';
 
return;
 
}

That’s just an example that will dump the data, not do anything with it. You could probably make the initial SQL statement better, and avoid the SQL per attendee, but my SQL-fu is not that good.


Joost

May 25, 2015 at 7:35 am

Hi Dean,

Thanks for the effort. However, I’ve given it a try and the result is very far from what I would expect. Indeed a dump of a lot of data in which I can’t trace what I need. I’m afraid that my development skills are insufficient to get this done in this way.

But isn’t this functionality not a very logical one for a plugin? Creating a page with (selected) details of all attendees sounds like a very common function to me. If I’m correct, such a functionality was part of EE3. Apparently it dissappeared in EE4. I’d be happy to purchase a good plugin for this, provided I can define what information is shown and how. Isn’t this in the pipeline already?


Lorenzo Orlando Caum

  • Support Staff

May 25, 2015 at 9:34 am

Hi, we are actually working on introducing an attendee list shortcode into Event Espresso 4. This should be available within a couple weeks.


Lorenzo


Joost

May 25, 2015 at 9:45 am

Perfect! Looking forward to it!


Joost

June 1, 2015 at 3:28 am

I’m just curious and impatient, I know. Sorry for that ๐Ÿ˜‰ I have a large event in two weeks. Any chance the new shortcode is released by then?


Dean

June 1, 2015 at 4:35 am

Hi Joost,

Sorry but we can’t say for sure. The shortcode is still in discussion, so while it may be ready before the point you need it, I would say to work on the basis it won’t be ready.


Joost

June 1, 2015 at 4:58 am

Thanks Dean, that’s a fair answer.

As a workaround I will work with the simple shortcode as discussed (for a simple but automated up-to-date attendee list) and make a manual CSV dump of the registrations for the final list.

Joost


Dean

June 1, 2015 at 5:42 am

No problem. Keep an eye out for updates and check the Change Log (https://eventespresso.com/wiki/ee4-changelog/) and it should advise when the shortcode becomes available. Bear in mind the first iteration may only be fairly basic.

Viewing 11 reply threads

The support post ‘Front end attendee list EE4’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso