I'm working with the Events module and am modifying the block display. Thanks to the community here I've gotten the date to show in the block instead of the less useful days remaining. I also strained my PHP knowledge and figured out how to truncate the time off of the date using substr (hey, it's only been twenty years since I did serious coding!).
Now I want to add the location of the event to the block display. In this case I added this field to the events using CCK and the problem I'm running into is that there is simply nothing shown in the events block when I try to display this. I'm guessing that this data isn't passed to this function, but I'm not sure how to go about this. Here's the code.
function event_block_upcoming($limit = 8) {
global $user;
$time = time();
// Lookup events currently taking place and upcoming events, up to $limit events.
$result = db_query(db_rewrite_sql("SELECT n.nid, n.title, n.type, n.status, n.changed, e.event_start, e.event_end FROM {node} n INNER JOIN {event} e ON n.nid = e.nid WHERE n.status = 1 AND (((e.event_start != e.event_end) AND (%d >= e.event_start AND %d < e.event_end)) OR ((e.event_start = e.event_end) AND (%d <= e.event_start + %d )) OR e.event_start >= %d) ORDER BY event_start LIMIT %d"), $time, $time, $time, (60 * 60 * 2), $time, $limit);
while ($node = db_fetch_object($result)) {