summaryrefslogtreecommitdiff
path: root/templates/themes/ukko/theme.php
diff options
context:
space:
mode:
authorczaks <marcin@6irc.net>2014-04-30 17:24:11 +0200
committerczaks <marcin@6irc.net>2014-04-30 18:18:55 +0200
commit776bbeb73e51dca272de3831b6715b67d76c841f (patch)
tree378d61fc8107023c0df45110284bbe7073fc708a /templates/themes/ukko/theme.php
parent400df0975fc6eb0570ed65706dadc81281f5dc75 (diff)
ukko: mod support for ukko; fixes #23
Diffstat (limited to 'templates/themes/ukko/theme.php')
-rw-r--r--templates/themes/ukko/theme.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/templates/themes/ukko/theme.php b/templates/themes/ukko/theme.php
index 88b0c4a4..2aff2837 100644
--- a/templates/themes/ukko/theme.php
+++ b/templates/themes/ukko/theme.php
@@ -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'])
+ ));
}
};