diff --git a/functions.php b/functions.php index 086f5d3..ba34a14 100644 --- a/functions.php +++ b/functions.php @@ -347,4 +347,5 @@ if (function_exists("pll_register_string")) { pll_register_string('high_quality','HIGH_QUALITY'); pll_register_string('all_streams','ALL_STREAMS'); pll_register_string('tba','TBA'); + pll_register_string('feedback','Submit feedback'); } diff --git a/schedule/parse.php b/schedule/parse.php index 7ada9d4..328f076 100644 --- a/schedule/parse.php +++ b/schedule/parse.php @@ -221,7 +221,8 @@ function parseData($config, $data) { $lastTs = 0; $fulltalks = ''; $hall_ids = []; - + $now = time(); + foreach ($events as $slot_index => $events_data) { $columns = []; @@ -250,6 +251,7 @@ function parseData($config, $data) { $eid = &$event_info['event_id']; $event = &$data['events'][$eid]; +# var_dump($microslots[$slot_index]); $title = mb_substr($event['title'], 0, $config['cut_len']) . (mb_strlen($event['title']) > $config['cut_len'] ? '...' : ''); $speakers = ''; @@ -268,6 +270,14 @@ function parseData($config, $data) { $speakers = implode (', ', $spk); } + if ($microslots[$slot_index][0] < $now) { + // talk has already started. Provide feedback links + $fullfb = '
'; + $progfb = ''; + } else { + $fullfb = ""; + $progfb = ""; + } $content = '' . htmlspecialchars($title) . '' . $event['title'] . ' ' . $fulltalk_spkr . '
'; $fulltalks .= '' . $event['abstract'] . '
'; - $fulltalks .= ''; + $fulltalks .= $fullfb; $fulltalks .= ''; } + if ($eid === $lastEventId) { array_pop($columns); ++$colspan; @@ -309,7 +320,7 @@ function parseData($config, $data) { $cssClasses = count($cssClasses) > 0 ? (' class="' . implode(' ', $cssClasses) . '"') : ''; // Render cell - $columns[] = '