|
@ -3,6 +3,11 @@ |
|
|
require_once 'inc/functions.php'; |
|
|
require_once 'inc/functions.php'; |
|
|
require_once 'templates/themes/overboards/overboards.php'; |
|
|
require_once 'templates/themes/overboards/overboards.php'; |
|
|
|
|
|
|
|
|
|
|
|
// Boards that are nsfw |
|
|
|
|
|
$nsfw_boards = ['b', 'overboard']; |
|
|
|
|
|
// Boards where posts are not allowed to be created |
|
|
|
|
|
$readonly_boards = []; |
|
|
|
|
|
|
|
|
// Allowed boards |
|
|
// Allowed boards |
|
|
$whitelist = []; |
|
|
$whitelist = []; |
|
|
foreach ($config['boards'] as $boards) { |
|
|
foreach ($config['boards'] as $boards) { |
|
@ -12,15 +17,9 @@ foreach ($config['boards'] as $boards) { |
|
|
} |
|
|
} |
|
|
foreach ($overboards_config as $board) { |
|
|
foreach ($overboards_config as $board) { |
|
|
$whitelist[] = $board['uri']; |
|
|
$whitelist[] = $board['uri']; |
|
|
|
|
|
$readonly_boards[] = $board['uri']; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Boards that are nsfw |
|
|
|
|
|
$nsfw_boards = ['b', 'overboard']; |
|
|
|
|
|
// Boards that use spoiler_alunya.png as their spoiler |
|
|
|
|
|
$alunya_spoiler = ['leftypol', 'anime']; |
|
|
|
|
|
// Boards where posts are not allowed to be created |
|
|
|
|
|
$readonly_boards = ['overboard', 'sfw', 'alt']; |
|
|
|
|
|
|
|
|
|
|
|
$board_list = listBoards(); |
|
|
$board_list = listBoards(); |
|
|
|
|
|
|
|
|
// Add objects that are not boards but are treated as such |
|
|
// Add objects that are not boards but are treated as such |
|
@ -33,7 +32,6 @@ foreach ($overboards_config as $overboard) { |
|
|
* - code<string>: The board code ('b', 'tech', ...) |
|
|
* - code<string>: The board code ('b', 'tech', ...) |
|
|
* - name<string>: The board user-readable name ('Siberia', ...) |
|
|
* - name<string>: The board user-readable name ('Siberia', ...) |
|
|
* - sfw<boolean>: Is this board sfw? |
|
|
* - sfw<boolean>: Is this board sfw? |
|
|
* - alternate_spoilers<boolean>: Does this board use the alunya spoiler? |
|
|
|
|
|
* - posting_enabled<boolean>: Can new posts be created belonging to this board? |
|
|
* - posting_enabled<boolean>: Can new posts be created belonging to this board? |
|
|
*/ |
|
|
*/ |
|
|
$boards = []; |
|
|
$boards = []; |
|
@ -47,7 +45,6 @@ foreach ($board_list as $board) { |
|
|
'code' => $board['uri'], |
|
|
'code' => $board['uri'], |
|
|
'name' => $board['title'], |
|
|
'name' => $board['title'], |
|
|
'sfw' => !in_array($board['uri'], $nsfw_boards), |
|
|
'sfw' => !in_array($board['uri'], $nsfw_boards), |
|
|
'alternate_spoilers' => in_array($board['uri'], $alunya_spoiler), |
|
|
|
|
|
'posting_enabled' => !in_array($board['uri'], $readonly_boards), |
|
|
'posting_enabled' => !in_array($board['uri'], $readonly_boards), |
|
|
]; |
|
|
]; |
|
|
} |
|
|
} |
|
|