Try my implementation. I did not read up all the comments to the lasthere, but this information table was satisfying our needs so far (there are no action links for each attendee entry here)
You get a list of peopel attending with the time they committed and a comment as well. At last, you get a summary of how many participate. YOUR entry is highlited if found.
<?php
/*
* Called by wp-content/themes/twentyten/plugins/events-manager/placeholders/attendees.php
* Called by procedure described in /wp-content/plugins/events-manager/templates/placeholders/readme.txt
*
*
* @Shonu
* @Date 16/08/2011 11:45:19
*/
showBookingsTable();
##########################################################################################################
function showBookingsTable($attributes = array()){
global $EM_Event;
if(!$EM_Event || !$EM_Event->rsvp ) return;
$lister = $EM_Event->get_bookings(); ///$bookings->get( $args = array());//
$bookerList = $lister->bookings;
$wpCurrentUserObj = wp_get_current_user();
$currentUserID = $wpCurrentUserObj->ID;
$userProfile = "/wp-admin/user-edit.php?user_id=#ID#";
$table .= "<tr>"
."<th>Full Name</th>"
."<th>Time registered</th>"
."<th>Status</th>"
."<th>Seats</th>"
."<th>Comments</th>"
."</tr>";
//error_reporting(E_WARNING);
foreach($bookerList as $EM_Booking)
{
$atendeesNo = $atendeesNo + $EM_Booking->spaces;
if(0){
echo "<pre>";
print_r($EM_Booking);
echo "</pre>";
}
$bookedUserID = $EM_Booking->person_id;//Not the user ID!! It is a ticket id or so
$personObj = $EM_Booking->person;
$userFirstname = $personObj->first_name;
$userLastname = $personObj->last_name;
$userDispname = $EM_Booking->person->display_name;
if(0){
echo "<pre>";
print_r($personObj);
echo "</pre>";
}
/* @var $EM_Booking EM_Booking */
$aTRs = array();
foreach( $EM_Booking->get_tickets_bookings() as $EM_Ticket_Booking)
{
/* @var $EM_Ticket EM_Ticket */
/* @var $EM_Ticket_Booking EM_Ticket_Booking */
$EM_Ticket = $EM_Ticket_Booking->get_ticket();
$isCurrentUser = $bookedUserID == $currentUserID;
$userName = "<span title='login or register to reveal'>*********</span>";
if(is_user_logged_in()){
if($userLastname && $userFirstname)
$userName = $userFirstname . " " . $userLastname ;
else //if($userFirstname)
//$userName = $EM_Booking->person->display_name;
$userName = $userDispname;
}
$sorterStringPrefix = "<!-- ".$EM_Booking->timestamp."-->";
//$userProfile = $currentUserID ? "<a href=\"".str_replace("#ID#", $currentUserID, $userProfile)."\">$userName</a>":$userName;
$row = array(
//$EM_Booking->id,
$userName ,//. " [$bookedUserID = $currentUserID]"
//$EM_Booking->person->user_email,
//$EM_Booking->person->phone,
date('d.m.Y H:i', $EM_Booking->timestamp),
$EM_Booking->get_status(),
//$EM_Ticket->name,
$EM_Ticket_Booking->get_spaces(),
//$EM_Ticket_Booking->get_price(),
preg_replace("/<|>/", "-", $EM_Booking->comment)
);
//Display all values
$newTR = $sorterStringPrefix."<tr ".($isCurrentUser ? "style='background-color:#FFFFDD;'":"")."><!-- $currentUserID === {$EM_Booking->id} -->\r\n";
foreach($row as $value){
//$value = str_replace('"', '""', $value);
//$value = str_replace("=", "", $value);
//$file .= '"' . preg_replace("/\n\r|\r\n|\n|\r/", ". ", $value) . '",';
$newTR .= "\t<td>" . $value . "</td>\r\n";
}
$newTR .= "</tr>\r\n";
$aTRs[$EM_Booking->timestamp] = $newTR;
}
if(0)
$table .= $newTR;
else{
natsort($aTRs);
$table .= implode("", $aTRs);
}
}//booker list
$table .= "<tr><th colspan='3' style='text-align:right'>Total Attendees so far</th><td><b>$atendeesNo</b></td></tr>";
reset($bookerList);
if(!$lister || !$bookerList)
echo "<p><b>Sorry, nobody is yet attending...</b></p>";
else
echo "<table><caption><h3>People Attending</h3></caption>\r\n" . $table . "</table>";
}
?>