Rewrite the schedule generation script #31
|
@ -228,7 +228,7 @@ h3 small {
|
||||||
/* Navigation */
|
/* Navigation */
|
||||||
nav {
|
nav {
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 84px;
|
height: 81px;
|
||||||
background: url("../img/navbg.jpg") repeat-x;
|
background: url("../img/navbg.jpg") repeat-x;
|
||||||
}
|
}
|
||||||
nav ul {
|
nav ul {
|
||||||
|
|
|
@ -342,4 +342,5 @@ if (function_exists("pll_register_string")) {
|
||||||
pll_register_string('normal_quality','NORMAL_QUALITY');
|
pll_register_string('normal_quality','NORMAL_QUALITY');
|
||||||
pll_register_string('high_quality','HIGH_QUALITY');
|
pll_register_string('high_quality','HIGH_QUALITY');
|
||||||
pll_register_string('all_streams','ALL_STREAMS');
|
pll_register_string('all_streams','ALL_STREAMS');
|
||||||
|
pll_register_string('tba','TBA');
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,6 +35,6 @@
|
||||||
if(openfest_home_page()){
|
if(openfest_home_page()){
|
||||||
$blog_details = get_blog_details();
|
$blog_details = get_blog_details();
|
||||||
$blog_slug = str_replace('/', '', $blog_details->path);
|
$blog_slug = str_replace('/', '', $blog_details->path);
|
||||||
echo '<section class="banner cf"><img src="'.get_template_directory_uri().'/img/banner-'.of_get_lang().'-'. $blog_slug .'.png" alt="" /></section>';
|
echo '<section class="banner cf" style="background: url(\''.get_template_directory_uri().'/img/banner-back-'.$blog_slug.'.jpg\') top repeat-x;padding: 0.2em 0 0 0;height: 258px;"><img src="'.get_template_directory_uri().'/img/banner-'.of_get_lang().'-'. $blog_slug .'.png" alt="" /></section>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Before Width: | Height: | Size: 192 KiB After Width: | Height: | Size: 192 KiB |
Before Width: | Height: | Size: 192 KiB After Width: | Height: | Size: 192 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 74 KiB |
|
@ -4,7 +4,6 @@ get_header();
|
||||||
wp_nav_menu( array( 'theme_location' => 'footer-schedule', 'container_class' => 'content subnav cf' ) );
|
wp_nav_menu( array( 'theme_location' => 'footer-schedule', 'container_class' => 'content subnav cf' ) );
|
||||||
|
|
||||||
require("schedule-config.php");
|
require("schedule-config.php");
|
||||||
|
|
||||||
$content = require __DIR__ . DIRECTORY_SEPARATOR . 'schedule' . DIRECTORY_SEPARATOR . 'parse.php';
|
$content = require __DIR__ . DIRECTORY_SEPARATOR . 'schedule' . DIRECTORY_SEPARATOR . 'parse.php';
|
||||||
//var_dump($data);
|
//var_dump($data);
|
||||||
?>
|
?>
|
||||||
|
@ -12,7 +11,8 @@ $content = require __DIR__ . DIRECTORY_SEPARATOR . 'schedule' . DIRECTORY_SEPARA
|
||||||
<div class="col-left">
|
<div class="col-left">
|
||||||
<h1><?php pll_e('Програма') ?></h1>
|
<h1><?php pll_e('Програма') ?></h1>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if (!empty($content) && !empty($content['slots'])) { ?>
|
||||||
<table cellpadding="0" cellspacing="0" style="text-align: center;" class="schedule">
|
<table cellpadding="0" cellspacing="0" style="text-align: center;" class="schedule">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -48,6 +48,9 @@ $content = require __DIR__ . DIRECTORY_SEPARATOR . 'schedule' . DIRECTORY_SEPARA
|
||||||
foreach ($content['fulltalks'] as $line) {
|
foreach ($content['fulltalks'] as $line) {
|
||||||
echo str_replace('SPKURL', $CF['speakers_url'], $line), PHP_EOL;
|
echo str_replace('SPKURL', $CF['speakers_url'], $line), PHP_EOL;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
pll_e("TBA");
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<?php get_sidebar(); ?>
|
<?php get_sidebar(); ?>
|
||||||
|
|
|
@ -13,7 +13,7 @@ $content = require __DIR__ . DIRECTORY_SEPARATOR . 'schedule' . DIRECTORY_SEPARA
|
||||||
<h1><?php pll_e('Лектори') ?></h1>
|
<h1><?php pll_e('Лектори') ?></h1>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
if (!empty($content)) {
|
||||||
foreach ($content['gspk'] as $line) {
|
foreach ($content['gspk'] as $line) {
|
||||||
echo $line, PHP_EOL;
|
echo $line, PHP_EOL;
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,9 @@ $content = require __DIR__ . DIRECTORY_SEPARATOR . 'schedule' . DIRECTORY_SEPARA
|
||||||
foreach ($content['fspk'] as $line) {
|
foreach ($content['fspk'] as $line) {
|
||||||
echo $line, PHP_EOL;
|
echo $line, PHP_EOL;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
pll_e('TBA');
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<?php get_sidebar(); ?>
|
<?php get_sidebar(); ?>
|
||||||
|
|
|
@ -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) ),
|
$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(10, 11, 12), 'workshops' => array(12, 13, 14), 'all' => array(10, 11, 12, 13, 14) )
|
||||||
);
|
);
|
||||||
|
|
||||||
/* clarion conference ids */
|
/* clarion conference ids */
|
||||||
$confids = array('2014' => 1, '2015' => 2);
|
$confids = array('2014' => 1, '2015' => 2, '2016' => 3);
|
||||||
|
|
||||||
|
|
||||||
/* get stuff from WP and parse */
|
/* get stuff from WP and parse */
|
||||||
|
|
|
@ -86,7 +86,12 @@ class SmartCurl {
|
||||||
$response = curl_exec($this->ch);
|
$response = curl_exec($this->ch);
|
||||||
|
|
||||||
if ($response === false) {
|
if ($response === false) {
|
||||||
return false;
|
if (file_exists($cache_file)) {
|
||||||
|
return file_get_contents($cache_file);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//var_dump(curl_getinfo($this->ch, CURLINFO_HEADER_OUT));
|
//var_dump(curl_getinfo($this->ch, CURLINFO_HEADER_OUT));
|
||||||
|
|