forked from leftypol/leftypol
Created basis for mod dashboard
This commit is contained in:
parent
e16a05cda7
commit
bbb7910398
2 changed files with 42 additions and 1 deletions
25
inc/mod.php
Normal file
25
inc/mod.php
Normal file
|
@ -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>';
|
||||
}
|
||||
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue