forked from leftypol/leftypol
Add overboard catalog support. This is an horrenouds hack. Pray to god we manage to refactor it away. See #94
This commit is contained in:
parent
6ac0e47f15
commit
6fcd4f4779
1 changed files with 15 additions and 1 deletions
|
@ -766,8 +766,22 @@ function mod_view_catalog($boardName) {
|
||||||
|
|
||||||
if (openBoard($boardName)) {
|
if (openBoard($boardName)) {
|
||||||
echo $catalog->build($boardName, true);
|
echo $catalog->build($boardName, true);
|
||||||
|
}
|
||||||
|
// What follows if horrendous. I am ashamed of myself. See https://git.leftypol.org/leftypol/leftypol/issues/94
|
||||||
|
elseif ($boardName === 'overboard' || $boardName === 'sfw' || $boardName === 'alt') {
|
||||||
|
require "templates/themes/overboards/overboards.php";
|
||||||
|
|
||||||
|
$settings = array_merge($settings, themeSettings('catalog'));
|
||||||
|
|
||||||
|
foreach ($overboards_config as &$overboard) {
|
||||||
|
if ($overboard['uri'] === $boardName) {
|
||||||
|
$included_boards = array_diff(listBoards(true), $overboard['exclude']);
|
||||||
|
echo $catalog->buildOverboard($overboard['uri'], $settings, $included_boards, true);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
error("The overboard(s) mod catalog hasn't been implemented yet");
|
error("Unknown board");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue