diff options
| author | Savetheinternet <savetheinternet@n0v4.com> | 2011-02-19 20:16:13 +1100 |
|---|---|---|
| committer | Savetheinternet <savetheinternet@n0v4.com> | 2011-02-19 20:16:13 +1100 |
| commit | c5aa3fdcc19fa9d845676307c8fc0e9270e628ae (patch) | |
| tree | a794e41859b04aeef94b742e06a224982864cdc3 /inc/display.php | |
| parent | 9443c0f234731a92579dbe992d13034eead764e4 (diff) | |
Added boardlinks
Diffstat (limited to 'inc/display.php')
| -rw-r--r-- | inc/display.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/inc/display.php b/inc/display.php index 1ee16c05..0def6cda 100644 --- a/inc/display.php +++ b/inc/display.php @@ -18,6 +18,32 @@ $n = strval($n); return (intval($n) < 1000) ? $n : commaize(substr($n, 0, -3)) . ',' . substr($n, -3); } + + function doBoardListPart($list, $root) { + global $config; + + $body = ''; + foreach($list as $board) { + if(is_array($board)) + $body .= ' [' . doBoardListPart($board, $root) . '] '; + else { + $body .= ' <a href="' . $root . $board . '/' . $config['file_index'] . '">' . $board . '</a> /'; + } + } + $body = preg_replace('/\/$/', '', $body); + + return $body; + } + + function createBoardlist($mod=false) { + global $config; + + if(!isset($config['boards'])) return ''; + + $body = doBoardListPart($config['boards'], $mod?'?/':$config['root']); + + return '<div class="boardlist">' . $body . '</div>'; + } function error($message) { global $board, $mod, $config; |
