Exemplo n.º 1
0
function createBoardlist($mod = false)
{
    global $config;
    if (!isset($config['boards'])) {
        return array('top' => '', 'bottom' => '');
    }
    $body = doBoardListPart($config['boards'], $mod ? '?/' : $config['root']);
    if (!preg_match('/\\] $/', $body)) {
        $body = '[' . $body . ']';
    }
    $body = trim($body);
    return array('top' => '<div class="boardlist">' . $body . '</div>', 'bottom' => '<div class="boardlist bottom">' . $body . '</div>');
}
Exemplo n.º 2
0
function createBoardlist($mod = false)
{
    global $config;
    if (!isset($config['boards'])) {
        return array('top' => '', 'bottom' => '');
    }
    $xboards = listBoards();
    $boards = array();
    foreach ($xboards as $val) {
        $boards[$val['uri']] = $val['title'];
    }
    $body = doBoardListPart($config['boards'], $mod ? '?/' : $config['root'], $boards);
    if ($config['boardlist_wrap_bracket'] && !preg_match('/\\] $/', $body)) {
        $body = '[' . $body . ']';
    }
    $body = trim($body);
    // Message compact-boardlist.js faster, so that page looks less ugly during loading
    $top = "<script type='text/javascript'>if (typeof do_boardlist != 'undefined') do_boardlist();</script>";
    return array('top' => '<div class="boardlist">' . $body . '</div>' . $top, 'bottom' => '<div class="boardlist bottom">' . $body . '</div>');
}