forked from leftypol/leftypol
Merge pull request 'Hack in support for the overboard catalog. Solves #94' (#107) from overboard-catalog-hack into config
Reviewed-on: https://git.leftypol.org/leftypol/leftypol/pulls/107
This commit is contained in:
commit
aca9ca0d7b
1 changed files with 13 additions and 2 deletions
|
@ -766,8 +766,19 @@ function mod_view_catalog($boardName) {
|
|||
|
||||
if (openBoard($boardName)) {
|
||||
echo $catalog->build($boardName, true);
|
||||
} else {
|
||||
error("The overboard(s) mod catalog hasn't been implemented yet");
|
||||
}
|
||||
// What follows if horrendous. I am ashamed of myself. See https://git.leftypol.org/leftypol/leftypol/issues/94
|
||||
else {
|
||||
require "templates/themes/overboards/overboards.php";
|
||||
foreach ($overboards_config as &$overboard) {
|
||||
if ($overboard['uri'] === $boardName) {
|
||||
$settings = array_merge($settings, themeSettings('catalog'));
|
||||
|
||||
$included_boards = array_diff(listBoards(true), $overboard['exclude']);
|
||||
echo $catalog->buildOverboard($overboard['uri'], $settings, $included_boards, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue