summaryrefslogtreecommitdiff
path: root/inc/mod.php
blob: 00f94544dc8a6ca9af4fd756db9e18567616544f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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>';
	}

?>