diff options
Diffstat (limited to 'inc/mod.php')
| -rw-r--r-- | inc/mod.php | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/inc/mod.php b/inc/mod.php new file mode 100644 index 00000000..00f94544 --- /dev/null +++ b/inc/mod.php @@ -0,0 +1,25 @@ +<?php + + // Generates a <ul> element with a list of linked + // boards and their subtitles. + function ulBoards() { + $body = '<ul>'; + + // List of boards + $boards = listBoards(); + + foreach($boards as &$b) { + $body .= '<li>' . + '<a href="?/' . + sprintf(BOARD_PATH, $b['uri']) . FILE_INDEX . + '">' . + sprintf(BOARD_ABBREVIATION, $b['uri']) . + '</a>' . + (isset($b['subtitle']) ? ' - ' . $b['subtitle'] : '') . + '</li>'; + } + + return $body . '</ul>'; + } + +?>
\ No newline at end of file |
