From df3138a09e5f895aad136ff8bf95cbcd59e2e361 Mon Sep 17 00:00:00 2001 From: Vasil Kolev Date: Tue, 5 Jul 2016 14:47:12 +0300 Subject: [PATCH] add new program conifg, tba label --- functions.php | 1 + page-schedule.php | 6 +++++- page-speakers.php | 5 ++++- schedule-config.php | 5 +++-- schedule/load.php | 4 ++-- 5 files changed, 15 insertions(+), 6 deletions(-) diff --git a/functions.php b/functions.php index 4cc3b5a..41c624f 100644 --- a/functions.php +++ b/functions.php @@ -342,4 +342,5 @@ if (function_exists("pll_register_string")) { pll_register_string('normal_quality','NORMAL_QUALITY'); pll_register_string('high_quality','HIGH_QUALITY'); pll_register_string('all_streams','ALL_STREAMS'); + pll_register_string('tba','TBA'); } diff --git a/page-schedule.php b/page-schedule.php index 77f5cda..cf14eea 100644 --- a/page-schedule.php +++ b/page-schedule.php @@ -12,7 +12,8 @@ $content = require __DIR__ . DIRECTORY_SEPARATOR . 'schedule' . DIRECTORY_SEPARA

- + @@ -48,6 +49,9 @@ $content = require __DIR__ . DIRECTORY_SEPARATOR . 'schedule' . DIRECTORY_SEPARA foreach ($content['fulltalks'] as $line) { echo str_replace('SPKURL', $CF['speakers_url'], $line), PHP_EOL; } +} else { + pll_e("TBA"); +} ?> diff --git a/page-speakers.php b/page-speakers.php index d4deb25..8640a90 100644 --- a/page-speakers.php +++ b/page-speakers.php @@ -13,7 +13,7 @@ $content = require __DIR__ . DIRECTORY_SEPARATOR . 'schedule' . DIRECTORY_SEPARA

diff --git a/schedule-config.php b/schedule-config.php index 0034ff9..389afaa 100644 --- a/schedule-config.php +++ b/schedule-config.php @@ -9,11 +9,12 @@ $CF['lang'] = pll_current_language('slug'); $hall_defs = array( '2014' => array('lectures' => array(1, 2, 3), 'workshops' => array(4, 5), 'all' => array(1, 2, 3, 4, 5) ), - '2015' => array('lectures' => array(6, 7, 8), 'workshops' => array(9), 'all' => array(6, 7, 8, 9) ) + '2015' => array('lectures' => array(6, 7, 8), 'workshops' => array(9), 'all' => array(6, 7, 8, 9) ), + '2016' => array('lectures' => array(6, 7), 'workshops' => array(8, 9), 'all' => array(6, 7, 8, 9) ) ); /* clarion conference ids */ -$confids = array('2014' => 1, '2015' => 2); +$confids = array('2014' => 1, '2015' => 2, '2016' => 3); /* get stuff from WP and parse */ diff --git a/schedule/load.php b/schedule/load.php index 9c2c971..f34503e 100644 --- a/schedule/load.php +++ b/schedule/load.php @@ -20,8 +20,8 @@ foreach ($filenames as $name => $filename) { $json = $curl->getUrl($filename); if ($json === false) { - echo 'get failed: ', $filename, ' ', $base_url, PHP_EOL; - exit; + // echo 'get failed: ', $filename, ' ', $base_url, PHP_EOL; + return null; } $decoded = json_decode($json, true);