eventsmanager

attendeeslist.php

Apr 3rd, 2013
329
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. /*
  4.  
  5. 1. Create this folders in your theme directory at wp-contents > themes > Your Theme > (create this folders and php file) plugins > events-manager > placeholders > attendeeslist.php
  6.  
  7. 2. edit attendeeslist.php and paste this snippet
  8.  
  9. 3. save
  10.  
  11. note: noticed #_BOOKINGFORMCUSTOM{team} and you can replace team with your booking form field id under Events > Forms Editor
  12.  
  13. */
  14.  
  15. ?>
  16.  
  17. <?php if (!( $EM_Event->get_bookings()->get_booked_spaces() > 0 )): ?>
  18. </br>None so far.</br>
  19. <?php endif; ?>
  20.  
  21. <?php
  22.  
  23. /* @var $EM_Event EM_Event */
  24. $people = array();
  25. $EM_Bookings = $EM_Event->get_bookings();
  26. if( count($EM_Bookings->bookings) > 0 ){
  27. ?>
  28. <ul class="event-attendees">
  29. <?php
  30. foreach( $EM_Bookings as $EM_Booking){
  31. if($EM_Booking->get_spaces() >= 2 && $EM_Booking->status == 1 && !in_array($EM_Booking->get_person()->ID, $people)){
  32.  
  33. $people[] = $EM_Booking->get_person()->ID;
  34. echo get_avatar( $EM_Booking->get_person()->ID, $size = '50' ),' ',$EM_Booking->get_person()->get_name() .' (confirmed ',$EM_Booking->get_spaces() .')';
  35. echo '<br/><strong>NAME</strong>: '.$EM_Booking->get_person()->get_name().'<br/>';
  36. echo '<strong>TEAM</strong>: '.$EM_Booking->output('#_BOOKINGFORMCUSTOM{team}');
  37.  
  38. }
  39.  
  40. if($EM_Booking->get_spaces() == 1 && $EM_Booking->status == 1 && !in_array($EM_Booking->get_person()->ID, $people)){
  41. $people[] = $EM_Booking->get_person()->ID;
  42. echo get_avatar( $EM_Booking->get_person()->ID, $size = '50' );
  43. echo '<br/><strong>NAME</strong>: '.$EM_Booking->get_person()->get_name().'<br/>';
  44. echo '<strong>TEAM</strong>: '.$EM_Booking->output('#_BOOKINGFORMCUSTOM{team}');
  45. }
  46.  
  47.  
  48.  
  49. }
  50. ?>
  51. </ul>
  52. <?php
  53. } ?>
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×