forked from leftypol/leftypol
Add overboard index support. Yet another ugly hack
This commit is contained in:
parent
aca9ca0d7b
commit
b742445f50
|
@ -786,34 +786,18 @@ function mod_view_board($boardName, $page_no = 1) {
|
|||
global $config, $mod;
|
||||
|
||||
if (!openBoard($boardName)){
|
||||
if (in_array($boardName, array_keys($config['overboards']))){
|
||||
$type = $config['overboards'][$boardName]['type'];
|
||||
require_once("templates/themes/$type/theme.php");
|
||||
global $mod;
|
||||
require "templates/themes/overboards/overboards.php";
|
||||
|
||||
$overboard = new $type();
|
||||
$overboard->settings = array();
|
||||
$overboard->settings['uri'] = $boardName;
|
||||
$overboard->settings['title'] = $config['overboards'][$boardName]['title'];
|
||||
$overboard->settings['subtitle'] = $config['overboards'][$boardName]['subtitle'];
|
||||
$overboard->settings['thread_limit'] = $config['overboards'][$boardName]['thread_limit'];
|
||||
if (array_key_exists('exclude',$config['overboards'][$boardName])) {
|
||||
$overboard->settings['exclude'] = $config['overboards'][$boardName]['exclude'];
|
||||
foreach ($overboards_config as $settings) {
|
||||
if ($settings['uri'] === $boardName) {
|
||||
require "templates/themes/overboards/theme.php";
|
||||
|
||||
$overboard = new overboards($overboards_config);
|
||||
echo $overboard->build($settings, true);
|
||||
return;
|
||||
}
|
||||
if (array_key_exists('include',$config['overboards'][$boardName])) {
|
||||
$overboard->settings['include'] = $config['overboards'][$boardName]['include'];
|
||||
}
|
||||
$overboard->settings['boards'] = listBoards();
|
||||
echo $overboard->build($mod);
|
||||
return;
|
||||
}
|
||||
elseif (in_array($boardName,array_keys($config['boards_alias']))){
|
||||
$boardName = $config['boards_alias'][$boardName];
|
||||
openBoard($boardName);
|
||||
}
|
||||
else {
|
||||
error($config['error']['noboard']);
|
||||
}
|
||||
error($config['error']['404']);
|
||||
}
|
||||
|
||||
if (!$page = index($page_no, $mod)) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user