forked from leftypol/leftypol
ukko: mod support for ukko; fixes #23
This commit is contained in:
parent
400df0975f
commit
776bbeb73e
4 changed files with 37 additions and 17 deletions
|
@ -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'])
|
||||
));
|
||||
}
|
||||
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue