|
|
@ -28,8 +28,17 @@ |
|
|
|
// Build homepage |
|
|
|
public static function homepage($settings) { |
|
|
|
global $config; |
|
|
|
|
|
|
|
return Element('themes/categories/frames.html', Array('config' => $config, 'settings' => $settings)); |
|
|
|
|
|
|
|
return Element( |
|
|
|
'themes/categories/frames.html', |
|
|
|
Array( |
|
|
|
'config' => $config, |
|
|
|
'settings' => $settings, |
|
|
|
'categories' => Categories::getCategories($config), |
|
|
|
'boardlist' => createBoardlist(false) |
|
|
|
|
|
|
|
) |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
// Build news page |
|
|
@ -43,7 +52,7 @@ |
|
|
|
'settings' => $settings, |
|
|
|
'config' => $config, |
|
|
|
'news' => $news, |
|
|
|
'boardlist' => createBoardlist(false) |
|
|
|
'boardlist' => createBoardlist(false) |
|
|
|
)); |
|
|
|
} |
|
|
|
|
|
|
@ -51,6 +60,14 @@ |
|
|
|
public static function sidebar($settings) { |
|
|
|
global $config, $board; |
|
|
|
|
|
|
|
return Element('themes/categories/sidebar.html', Array( |
|
|
|
'settings' => $settings, |
|
|
|
'config' => $config, |
|
|
|
'categories' => Categories::getCategories($config) |
|
|
|
)); |
|
|
|
} |
|
|
|
|
|
|
|
private static function getCategories($config) { |
|
|
|
$categories = $config['categories']; |
|
|
|
|
|
|
|
foreach ($categories as &$boards) { |
|
|
@ -61,12 +78,8 @@ |
|
|
|
$board = Array('title' => $title, 'uri' => sprintf($config['board_path'], $board)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return Element('themes/categories/sidebar.html', Array( |
|
|
|
'settings' => $settings, |
|
|
|
'config' => $config, |
|
|
|
'categories' => $categories |
|
|
|
)); |
|
|
|
|
|
|
|
return $categories; |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|