-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathschedule-config.php
More file actions
46 lines (34 loc) · 1.22 KB
/
schedule-config.php
File metadata and controls
46 lines (34 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
$requirePath = __DIR__ . DIRECTORY_SEPARATOR . 'schedule' . DIRECTORY_SEPARATOR;
require $requirePath . 'class.SmartCurl.php';
require $requirePath . 'config.php';
$year = get_blog_slug();
$sched_config = getSchedConfig($year);
$sched_config['lang'] = of_get_lang();
# we are using clarion
if($year !== '2025') {
require $requirePath . 'load-clarion.php';
require $requirePath . 'parse-clarion.php';
$data = loadData($sched_config);
if ( preg_match('/^workshop/', $pagename) ) {
$sched_config['filterEventType'] = "workshop";
} else if (!preg_match('/^full/', $pagename)) {
$sched_config['filterEventType'] = "lecture";
}
$content = parseData($sched_config, $data);
}
if($year === '2025') { # pretalx
require $requirePath . 'load-pretalx.php';
require $requirePath . 'parse-pretalx.php';
$type = 'all';
if ( preg_match('/^workshop/', $pagename) ) {
$type = "workshop";
} else if (!preg_match('/^full/', $pagename)) {
$type = "lecture";
}
$lang = $sched_config['lang'];
$sched_config['roomFilter'] = array_key_exists($type, $sched_config['roomTypes']) ? $sched_config['roomTypes'][$type] : NULL;
$data = loadData($sched_config, $lang);
$result = parseData($sched_config, $data);
$config = $sched_config;
}