ukko: mod support for ukko; fixes #23

This commit is contained in:
czaks
2014-04-30 17:24:11 +02:00
parent 8a73c084de
commit 318d75ac27
4 changed files with 37 additions and 17 deletions

View File

@@ -4,7 +4,9 @@
function ukko_build($action, $settings) {
$ukko = new ukko();
$ukko->settings = $settings;
$ukko->build();
file_write($settings['uri'] . '/index.html', $ukko->build());
file_write($settings['uri'] . '/ukko.js', Element('themes/ukko/ukko.js', array()));
}
class ukko {
@@ -85,17 +87,17 @@
}
$body .= '<script> var overflow = ' . json_encode($overflow) . '</script>';
$body .= '<script type="text/javascript" src="ukko.js"></script>';
$body .= '<script type="text/javascript" src="/'.$this->settings['uri'].'/ukko.js"></script>';
file_write($this->settings['uri'] . '/index.html', Element('index.html', array(
return Element('index.html', array(
'config' => $config,
'board' => $board,
'no_post_form' => true,
'body' => $body,
'boardlist' => createBoardlist($mod)
)));
file_write($this->settings['uri'] . '/ukko.js', Element('themes/ukko/ukko.js', array()));
'mod' => $mod,
'boardlist' => createBoardlist($mod),
'return' => ($mod ? '?' . $board['url'] . $config['file_index'] : $config['root'] . $board['dir'] . $config['file_index'])
));
}
};