summaryrefslogtreecommitdiff
path: root/inc/display.php
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@n0v4.com>2011-02-19 20:16:13 +1100
committerSavetheinternet <savetheinternet@n0v4.com>2011-02-19 20:16:13 +1100
commitc5aa3fdcc19fa9d845676307c8fc0e9270e628ae (patch)
treea794e41859b04aeef94b742e06a224982864cdc3 /inc/display.php
parent9443c0f234731a92579dbe992d13034eead764e4 (diff)
Added boardlinks
Diffstat (limited to 'inc/display.php')
-rw-r--r--inc/display.php26
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;