|
@ -29,7 +29,14 @@ |
|
|
public static function homepage($settings) { |
|
|
public static function homepage($settings) { |
|
|
global $config; |
|
|
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) |
|
|
|
|
|
) |
|
|
|
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Build news page |
|
|
// Build news page |
|
@ -51,6 +58,14 @@ |
|
|
public static function sidebar($settings) { |
|
|
public static function sidebar($settings) { |
|
|
global $config, $board; |
|
|
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']; |
|
|
$categories = $config['categories']; |
|
|
|
|
|
|
|
|
foreach ($categories as &$boards) { |
|
|
foreach ($categories as &$boards) { |
|
@ -62,11 +77,7 @@ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return Element('themes/categories/sidebar.html', Array( |
|
|
return $categories; |
|
|
'settings' => $settings, |
|
|
|
|
|
'config' => $config, |
|
|
|
|
|
'categories' => $categories |
|
|
|
|
|
)); |
|
|
|
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|