@ -372,7 +372,7 @@
// Generate data for the template
// Generate data for the template
$recent_posts = $this->generateRecentPosts($threads);
$recent_posts = $this->generateRecentPosts($threads);
$this->saveForBoard($board_name, $recent_posts, '/' . $settings['overboard_location']);
$this->saveForBoard($board_name, $recent_posts, '/' . $settings['overboard_location'], true );
// Build the overboard JSON outputs
// Build the overboard JSON outputs
if ($config['api']['enabled']) {
if ($config['api']['enabled']) {
@ -455,7 +455,7 @@
return $posts;
return $posts;
}
}
private function saveForBoard($board_name, $recent_posts, $board_link = null) {
private function saveForBoard($board_name, $recent_posts, $board_link = null, $is_overboard = false ) {
global $board, $config;
global $board, $config;
if ($board_link === null) {
if ($board_link === null) {
@ -471,16 +471,31 @@
$config['additional_javascript'][] = $s;
$config['additional_javascript'][] = $s;
}
}
file_write($config['dir']['home'] . $board_name . '/catalog.html', Element('themes/catalog/catalog.html', Array(
$template_config = Array(
'settings' => $this->settings,
'settings' => $this->settings,
'config' => $config,
'config' => $config,
'boardlist' => createBoardlist(),
'boardlist' => createBoardlist(),
'recent_images' => array(),
'recent_images' => array(),
'recent_posts' => $recent_posts,
'recent_posts' => $recent_posts,
'stats' => array(),
'stats' => array(),
'board' => $board_name,
'board' => $board,
'link' => $board_link
'link' => $board_link,
)));
'no_post_form' => false,
);
if ($is_overboard) {
// fake board, I vomit
$template_config['board'] = Array(
'uri' => $board_name,
'title' => $board_name,
'name' => $board_name,
'dir' => $board_name . '/',
'url' => '/' . $board_name . '/'
);
$template_config['no_post_form'] = true;
}
file_write($config['dir']['home'] . $board_name . '/catalog.html', Element('themes/catalog/catalog.html', $template_config));
file_write($config['dir']['home'] . $board_name . '/index.rss', Element('themes/catalog/index.rss', Array(
file_write($config['dir']['home'] . $board_name . '/index.rss', Element('themes/catalog/index.rss', Array(
'config' => $config,
'config' => $config,