From c70b4e3959dabda9d7f229335d5b138abe664404 Mon Sep 17 00:00:00 2001 From: 8chan Date: Sat, 19 Apr 2014 20:02:15 +0000 Subject: [PATCH] Remove openBoard() from ukko --- templates/themes/ukko/theme.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/templates/themes/ukko/theme.php b/templates/themes/ukko/theme.php index 1ca00014..c90d964d 100644 --- a/templates/themes/ukko/theme.php +++ b/templates/themes/ukko/theme.php @@ -10,7 +10,7 @@ class ukko { public $settings; public function build($mod = false) { - global $config; + global $config, $board; $boards = listBoards(); $body = ''; @@ -41,7 +41,9 @@ } if($count < $this->settings['thread_limit']) { - openBoard($post['board']); + $config['uri_thumb'] = '/'.$post['board'].'/thumb/'; + $config['uri_img'] = '/'.$post['board'].'/src/'; + $board['dir'] = $post['board'].'/'; $thread = new Thread($post, $mod ? '?/' : $config['root'], $mod); $posts = prepare(sprintf("SELECT * FROM ``posts_%s`` WHERE `thread` = :id ORDER BY `id` DESC LIMIT :limit", $post['board'])); @@ -51,6 +53,9 @@ $num_images = 0; while ($po = $posts->fetch()) { + $config['uri_thumb'] = '/'.$post['board'].'/thumb/'; + $config['uri_img'] = '/'.$post['board'].'/src/'; + if ($po['file']) $num_images++; @@ -87,6 +92,7 @@ $body .= ''; $body .= ''; + $config['default_stylesheet'] = array('Yotsuba B', $config['stylesheets']['Yotsuba B']); file_write($this->settings['uri'] . '/index.html', Element('index.html', array( 'config' => $config, 'board' => $board,