public function __construct($data, $boxname = "")
 {
     $this->BoardlistData['templatename'] = "listboards";
     $this->getBoxStatus($data);
     $this->BoardlistData['boxID'] = $data['boxID'];
     // DEFAULTS
     $lbLength = 24;
     $lbLevelCut = 3;
     $lbMaxHeight = 0;
     $lbSBColor = 2;
     $lbFontsize = '1.2em';
     $lbSpacer = 5;
     $lbIndent = ' » ';
     $lbIndentNewPosts = '<span style="font-weight:bold; color:Red;">&nbsp;&raquo;&nbsp;</span>';
     $lbShowNewPosts = true;
     // ACP Konstanten...
     if (!defined('LISTBOARDS_LENGTH_ACP')) {
         define('LISTBOARDS_LENGTH_ACP', $lbLength);
     }
     if (!defined('LISTBOARDS_LEVELCUT_ACP')) {
         define('LISTBOARDS_LEVELCUT_ACP', $lbLevelCut);
     }
     if (!defined('LISTBOARDS_MAXHEIGHT_ACP')) {
         define('LISTBOARDS_MAXHEIGHT_ACP', $lbMaxHeight);
     }
     if (!defined('LISTBOARDSBOX_SBCOLOR_ACP')) {
         define('LISTBOARDSBOX_SBCOLOR_ACP', $lbSBColor);
     }
     if (!defined('LISTBOARDS_MAINBOARD_FONTSIZE_ACP')) {
         define('LISTBOARDS_MAINBOARD_FONTSIZE_ACP', $lbFontsize);
     }
     if (!defined('LISTBOARDS_MAINBOARD_SPACER_ACP')) {
         define('LISTBOARDS_MAINBOARD_SPACER_ACP', $lbSpacer);
     }
     if (!defined('LISTBOARDS_SUBBOARD_INDENT_ACP')) {
         define('LISTBOARDS_SUBBOARD_INDENT_ACP', $lbIndent);
     }
     if (!defined('LISTBOARDS_NEWPOST_INDENT_ACP')) {
         define('LISTBOARDS_NEWPOST_INDENT_ACP', $lbIndentNewPosts);
     }
     if (!defined('LISTBOARDS_SHOW_NEWPOSTS_ACP')) {
         define('LISTBOARDS_SHOW_NEWPOSTS_ACP', $lbShowNewPosts);
     }
     // Boxen Hoehe
     if (WCF::getUser()->userID) {
         if (WCF::getUser()->listboards_maxheight >= 100) {
             $lbMaxHeight = intval(WCF::getUser()->listboards_maxheight);
         } else {
             if (WCF::getUser()->listboards_maxheight == 0 && LISTBOARDS_MAXHEIGHT_ACP >= 100) {
                 $lbMaxHeight = LISTBOARDS_MAXHEIGHT_ACP;
             }
         }
     }
     // Template Variablen zuordnen...
     WCF::getTPL()->assign(array('lbFontsize' => LISTBOARDS_MAINBOARD_FONTSIZE_ACP == '' ? $lbFontsize : LISTBOARDS_MAINBOARD_FONTSIZE_ACP, 'lbSpacer' => intval(LISTBOARDS_MAINBOARD_SPACER_ACP), 'lbIndent' => LISTBOARDS_SUBBOARD_INDENT_ACP, 'lbIndentNewPosts' => LISTBOARDS_NEWPOST_INDENT_ACP, 'lbSBColor' => intval(LISTBOARDSBOX_SBCOLOR_ACP), 'lbLength' => intval(LISTBOARDS_LENGTH_ACP), 'lbLevelCut' => intval(LISTBOARDS_LEVELCUT_ACP), 'lbShowNewPosts' => LISTBOARDS_SHOW_NEWPOSTS_ACP, 'lbMaxHeight' => $lbMaxHeight));
     // Forenliste
     require_once WBB_DIR . 'lib/data/board/BoardList.class.php';
     $boardList = new BoardList();
     $boardList->renderBoards();
 }
Beispiel #2
0
function list_get()
{
    global $DB;
    $Query = new BoardQuery();
    $List = new BoardList();
    $List->type(LIST_MESSAGE);
    $List->title(TITLE_BOARD);
    $List->header();
    $DB->query($Query->list_message(cmd(2, true), cmd(3, true)));
    $List->data($DB->load_all());
    $List->message();
    $List->footer();
}
Beispiel #3
0
function thread_get()
{
    global $DB;
    $Search = new Search();
    $offset = cmd(3, true) ? cmd(3, true) * 100 : 0;
    $res = $Search->query(cmd(2), "thread", $offset);
    $ids = array_keys($res['matches']);
    $page = cmd(3, true) + 1;
    $Query = new BoardQuery();
    $List = new BoardList();
    $List->type(LIST_THREAD_SEARCH);
    $List->title("Search Threads: " . htmlentities(cmd(2)));
    $List->subtitle(number_format($res['total']) . " results found showing " . ($offset ? $offset : 1) . "-" . ($offset + 100) . SPACE . ARROW_RIGHT . SPACE . "page: {$page}");
    $List->header(false);
    require_once DIR . "module/search/.content/main.php";
    $List->header_menu();
    if ($res['total'] == 0 || $offset > $res['total']) {
        $ids = array(0);
    }
    $DB->query($Query->list_thread(false, false, false, $ids));
    $List->data($DB->load_all());
    $List->thread();
    $List->footer();
}
Beispiel #4
0
$list[0][LIST_LAST_POSTER_NAME] = "color scheme";
$list[0][LIST_SUBJECT] = "color schemer";
$list[0][LIST_POSTS] = "5";
$list[0][LIST_VIEWS] = "5";
$list[0][LIST_FIRSTPOST_BODY] = "test";
$list[0][LIST_LAST_VIEW_POSTS] = "";
$list[0][LIST_DOTFLAG] = "";
$list[0][LIST_STICKY] = "";
$list[0][LIST_LOCKED] = "";
$list[0][LIST_LEGENDARY] = "";
$list[1] = $list[0];
$list[2] = $list[0];
$list[2][LIST_CREATOR_ID] = session('id');
$list[2][LIST_CREATOR_NAME] = $Core->namefromid(session('id'));
$list[3] = $list[0];
$List = new BoardList();
$List->type(LIST_THREAD);
$List->data($list);
$List->thread();
print "<br/>";
$view = array();
$view[0][VIEW_ID] = "";
$view[0][VIEW_DATE_POSTED] = time();
$view[0][VIEW_CREATOR_ID] = 0;
$view[0][VIEW_CREATOR_NAME] = "color scheme";
$view[0][VIEW_BODY] = "color scheme post text";
$view[0][VIEW_CREATOR_IP] = "";
$view[0][VIEW_SUBJECT] = "";
$view[0][VIEW_THREAD_ID] = "";
$view[0][VIEW_CREATOR_IS_ADMIN] = 'f';
$view[1] = $view[0];
Beispiel #5
0
function listfavoritesbymember_get()
{
    global $DB, $Core;
    // get info
    $id = $Core->idfromname(id());
    $name = $Core->namefromid($id);
    $page = cmd(3, true) + 1;
    // get threads participiated in
    $DB->query("SELECT\r\n                f.thread_id\r\n              FROM\r\n                favorite f\r\n              LEFT JOIN\r\n                thread t\r\n              ON\r\n                t.id = f.thread_id\r\n              WHERE\r\n                f.member_id=\$1\r\n              ORDER BY\r\n                t.date_last_posted DESC", array($id));
    $threads = $DB->load_all('thread_id');
    if (!$id || !$name) {
        return to_index();
    }
    $Query = new BoardQuery();
    $List = new BoardList();
    $List->type(LIST_THREAD_HISTORY);
    $List->title("Favorites: {$name}");
    $List->subtitle("page: {$page}");
    $List->header();
    $DB->query($Query->list_thread(false, cmd(3, true), cmd(4, true), $threads));
    $List->data($DB->load_all());
    $List->thread();
    $List->footer();
}
Beispiel #6
0
function listignoredthreadsbymember_get()
{
    global $DB, $Core;
    // get info
    $id = $Core->idfromname(id());
    $name = $Core->namefromid($id);
    $page = cmd(3, true) + 1;
    if (!$id || !$name) {
        return to_index();
    }
    if (!IGNORED_THREADS_PUBLIC && $id != session('id')) {
        return to_index();
    }
    // get threads participiated in
    $DB->query("SELECT\n                tm.thread_id\n              FROM\n                thread_member tm\n              LEFT JOIN\n                thread t\n              ON\n                t.id = tm.thread_id\n              WHERE\n                tm.member_id=\$1 AND tm.ignore=true\n              ORDER BY\n                t.date_last_posted DESC", array($id));
    $threads = $DB->load_all('thread_id');
    if (!$threads) {
        $threads = array(0);
    }
    $Query = new BoardQuery();
    $List = new BoardList();
    $List->type(LIST_THREAD_HISTORY);
    $List->title("Ignored threads: {$name}");
    $List->subtitle("page: {$page}");
    $List->header();
    $DB->query($Query->list_thread(false, cmd(3, true), cmd(4, true), $threads, false, false));
    $List->data($DB->load_all());
    $List->thread();
    $List->footer();
}
 /**
  * @see BoardList::renderBoards()
  */
 protected function renderBoards()
 {
     $boardList = new BoardList();
     $boardList->maxDepth = BOARD_LIST_DEPTH;
     $boardList->renderBoards();
 }