diff options
| author | Savetheinternet <savetheinternet@n0v4.com> | 2011-03-17 23:49:28 +1100 |
|---|---|---|
| committer | Savetheinternet <savetheinternet@n0v4.com> | 2011-03-17 23:49:28 +1100 |
| commit | fe9a8a1074c7a8aba4a92086a95c92bb20e60af3 (patch) | |
| tree | 7ac048903e3d0df7d31d31f5392432bb5af6a28d | |
| parent | 08c3edecc1c29187e11f3a9214e49c571d0f74a8 (diff) | |
Custom links in the board list
| -rw-r--r-- | inc/config.php | 5 | ||||
| -rw-r--r-- | inc/display.php | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/inc/config.php b/inc/config.php index 66c9c00f..640999ac 100644 --- a/inc/config.php +++ b/inc/config.php @@ -410,12 +410,13 @@ $config['always_noko'] = false; // Boardlinks - // You can group, order and place the boardlist at the top of every page, using the following template. + // You can group, order and place the boardlist at the top of every page, using the following template. //$config['boards'] = Array( // Array('a', 'b'), // Array('c', 'd', 'e', 'f', 'g'), // Array('h', 'i', 'j'), - // Array('k', Array('l', 'm')) + // Array('k', Array('l', 'm')), + // 'status' => 'http://status.example.org/' //); ?>
\ No newline at end of file diff --git a/inc/display.php b/inc/display.php index 7f10a597..086171c4 100644 --- a/inc/display.php +++ b/inc/display.php @@ -27,7 +27,11 @@ if(is_array($board)) $body .= ' [' . doBoardListPart($board, $root) . '] '; else { - $body .= ' <a href="' . $root . $board . '/' . $config['file_index'] . '">' . $board . '</a> /'; + if(($key = array_search($board, $list)) && gettype($key) == 'string') { + $body .= ' <a href="' . $board . '">' . $key . '</a> /'; + } else { + $body .= ' <a href="' . $root . $board . '/' . $config['file_index'] . '">' . $board . '</a> /'; + } } } $body = preg_replace('/\/$/', '', $body); |
