Browse Source
Merge pull request #1 from towards-a-new-leftypol/sidebarFix_fix
fix categories array in categories theme
pull/40/head
nonmakina
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
22 additions and
11 deletions
-
templates/themes/categories/frames.html
-
templates/themes/categories/theme.php
|
@ -65,7 +65,7 @@ |
|
|
<title>{{ settings.title }}</title> |
|
|
<title>{{ settings.title }}</title> |
|
|
</head> |
|
|
</head> |
|
|
<body> |
|
|
<body> |
|
|
{{ include(settings.file_sidebar) }} |
|
|
{% include 'themes/categories/' ~ settings.file_sidebar %} |
|
|
{{ include(settings.file_news) }} |
|
|
{% include 'themes/categories/' ~ settings.file_news %} |
|
|
</body> |
|
|
</body> |
|
|
</html> |
|
|
</html> |
|
|
|
@ -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 |
|
|
|
|
|
)); |
|
|
|
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|