Support

Home Forums Event Espresso Premium Listattendee Shortcode – chronological order

Listattendee Shortcode – chronological order

Posted: September 17, 2013 at 8:47 am

Viewing 8 reply threads


Harvey

September 17, 2013 at 8:47 am

Is there a way to show an attendee list for just one individual event in chronological order? That would be useful for a Waitlisted event, so people could see where they stand in the order.

Currently, all my lists are shown in alphabetical order, which I prefer in general, so I don’t want to change the standard approach.


Sidney Harrell

September 17, 2013 at 11:19 am

Sure, first you have to modify line 216 of includes/shortcodes.php to be:

event_espresso_attendee_list($event_id, $event_identifier, $category_identifier, $show_gravatar, $show_expired, $show_secondary, $show_deleted, $show_recurrence, $limit, $paid_only, $order_by);

and line 194 to be:

extract(shortcode_atts(array('event_id' => 'NULL', 'event_identifier' => 'NULL', 'category_identifier' => 'NULL', 'event_category_id' => 'NULL', 'show_gravatar' => 'NULL', 'show_expired' => 'NULL', 'show_secondary' => 'NULL', 'show_deleted' => 'NULL', 'show_recurrence' => 'NULL', 'limit' => 'NULL', 'paid_only' => 'NULL', 'order_by' => 'NULL'), $atts));

and then add a line after line 139, so that it reads:

$sort = $sort_by == 'last name' ? " ORDER BY lname " : '';
		$sort = $sort_by == 'date' ? " ORDER BY date " : $sort;

You would then use the shortcode attribute:
[LISTATTENDEES order_by=’date’]


Harvey

September 18, 2013 at 7:05 pm

Thanks Sidney. I’m using 4.0 caf with some customization done by EE. All my lines seem to be different from what you’re suggesting. I found the appropriate line for 216 above, but there several possibilities for your 194 replacement.

Can I email you my shortcodes.php file? There doesn’t seem to be a way to upload files in this forum.


Dean

September 19, 2013 at 12:12 am

HI,

Please use Pastebin to display your code


Harvey

September 21, 2013 at 11:26 am

Thanks Dean. Pastebin’s an interesting service. I’m now signed up and the code’s posted.

Here it is: http://pastebin.com/43sTdpQY


Sidney Harrell

September 23, 2013 at 3:26 pm

Instead of 216, looks like that line is now on 157.
Instead of 194, that is now 138.
Instead of 139, that is now on line 86.


Harvey

September 24, 2013 at 1:19 pm

Excellenet. I had to make a few easy modifications to your suggestion to reflect some different variable names … but that did it!

Many thanks.


Harvey

September 24, 2013 at 1:22 pm

Whoops – I spoke to soon. Now it’s showing all lists in chronological order, not just the one I want (I want the others in alphabetical order), even though I’m just using the shortcode in one post.

At this stage, I think I’ll just revert to alphabetical order. Thanks anyway.


Dean

September 24, 2013 at 11:57 pm

Thanks Harvey, I’ll mark this as closed.

Viewing 8 reply threads

The support post ‘Listattendee Shortcode – chronological order’ 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