diff options
author | MaZderMind | 2014-11-10 23:03:20 +0100 |
---|---|---|
committer | MaZderMind | 2014-11-10 23:03:20 +0100 |
commit | 91837b1646f7071f793c6fc7a44d2c4b21d048fa (patch) | |
tree | 2c4449fc7314e08179cab16cc07549f94be07e9a /lib | |
parent | 2ad3b1c61c4d2f11ad57840a091e4db397689405 (diff) |
show program teaser on the startpage
Diffstat (limited to 'lib')
-rw-r--r-- | lib/config.php | 7 | ||||
-rw-r--r-- | lib/program.php | 11 |
2 files changed, 16 insertions, 2 deletions
diff --git a/lib/config.php b/lib/config.php index 473bc56..7053cd7 100644 --- a/lib/config.php +++ b/lib/config.php @@ -29,3 +29,10 @@ $GLOBALS['CONFIG']['FORMATS'] = array( 'audio' => 'Audio', 'slides' => 'Slide-Images', ); + +// various room-name nappings +$GLOBALS['CONFIG']['FAHRPLAN_ROOM_MAPPING'] = array( + 'Grossbaustelle BER' => 'saal1', + 'Tiefbaustelle S21' => 'saal2', + 'Hochbaustelle Elbphilharmonie' => 'saal6', +); diff --git a/lib/program.php b/lib/program.php index cc8025d..0f038a8 100644 --- a/lib/program.php +++ b/lib/program.php @@ -46,8 +46,10 @@ function program() foreach($day->room as $room) { $roomidx++; - $name = (string)$room['name']; $lastend = false; + $name = (string)$room['name']; + if(isset($GLOBALS['CONFIG']['FAHRPLAN_ROOM_MAPPING'][$name])) + $name = $GLOBALS['CONFIG']['FAHRPLAN_ROOM_MAPPING'][$name]; foreach($room->event as $event) { @@ -85,8 +87,13 @@ function program() ); } - $program[$name][] = array( + $personnames = array(); + foreach($event->persons->person as $person) + $personnames[] = (string)$person; + + $program[$name][] = array( 'title' => (string)$event->title, + 'speaker' => implode(', ', $personnames), 'fstart' => date('c', $start), 'fend' => date('c', $end), |