From c5aa3fdcc19fa9d845676307c8fc0e9270e628ae Mon Sep 17 00:00:00 2001 From: Savetheinternet Date: Sat, 19 Feb 2011 20:16:13 +1100 Subject: Added boardlinks --- inc/display.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'inc/display.php') 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 .= ' ' . $board . ' /'; + } + } + $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 '
' . $body . '
'; + } function error($message) { global $board, $mod, $config; -- cgit v1.3