From 47a45da7a749b93b88231809e540050f1bf8ab88 Mon Sep 17 00:00:00 2001 From: Benjamin Southall Date: Sun, 23 Apr 2017 20:01:34 +0900 Subject: [PATCH] Fix mod_view_board for ukko / overboard theme / extension. Add support for boards_alias to mod_view_board and initial preliminary support to markup for crossboard citations --- inc/functions.php | 7 +++++++ inc/mod/pages.php | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/inc/functions.php b/inc/functions.php index 7a666ca2..ed00743c 100755 --- a/inc/functions.php +++ b/inc/functions.php @@ -2073,7 +2073,14 @@ function markup(&$body, $track_cites = false, $op = false) { if ($board['uri'] != $_board) { if (!openBoard($_board)) + { + if (in_array($_board,array_keys($config['boards_alias']))){ + $_board = $config['boards_alias'][$_board]; + openBoard($_board); + } + continue; // Unknown board + } } if (!empty($clauses)) { diff --git a/inc/mod/pages.php b/inc/mod/pages.php index 57174162..1f0ae8bf 100644 --- a/inc/mod/pages.php +++ b/inc/mod/pages.php @@ -756,7 +756,14 @@ function mod_view_board($boardName, $page_no = 1) { $overboard->settings['exclude'] = $config['overboards'][$boardName]['exclude']; 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']); }