Esempio n. 1
0
 public function templateForum()
 {
     $by = urlencode(Common::getGetString('tby', 'thread_lastdate'));
     $dir = urlencode(Common::getGetString('tdir', 'DESC'));
     $bby = urlencode(Common::getGetString('bby', 'board_pos'));
     $bdir = urlencode(Common::getGetString('bdir', 'ASC'));
     $orderby = GDO::table('GWF_ForumThread')->getMultiOrderby($by, $dir);
     $bid = $this->board->getVar('board_bid');
     $bt = $this->board->urlencodeSEO('board_title');
     $tVars = array('boards' => $this->board->getBoardPage($this->bPage, $this->tpp), 'board' => $this->board, 'pagemenu_boards' => GWF_PageMenu::display($this->bPage, $this->nBPages, sprintf(GWF_WEB_ROOT . 'forum-b%s/bby/%s/%s/%s-p%%PAGE%%.html', $bid, $bby, $bdir, $bt)), 'threads' => $this->board->getThreads($this->tpp, $this->page, $orderby), 'pagemenu_threads' => GWF_PageMenu::display($this->page, $this->nPages, sprintf(GWF_WEB_ROOT . 'forum-b%s/tby/%s/%s/%s-p%%PAGE%%.html', $bid, $by, $dir, $bt)), 'new_thread_allowed' => $this->board->isNewThreadAllowed(), 'unread_threads' => GWF_ForumThread::getUnreadThreadCount(GWF_Session::getUser()), 'latest_threads' => GWF_ForumThread::getLatestThreads($this->module->getNumLatestThreads()), 'href_options' => GWF_WEB_ROOT . 'forum/options', 'href_unread' => $this->module->getMethodURL('Unread'), 'href_search' => GWF_WEB_ROOT . 'forum/search', 'board_sort_url' => GWF_WEB_ROOT . sprintf('forum-b%s/bby/%%BY%%/%%DIR%%/%s-p1.html', $bid, $bt), 'thread_sort_url' => GWF_WEB_ROOT . sprintf('forum-b%s/bby/%s/%s/bp-%d/tby/%%BY%%/%%DIR%%/%s-p1.html', $bid, $bby, $bdir, $this->bPage, $bt), 'href_polls' => GWF_WEB_ROOT . 'poll_overview');
     return $this->module->templatePHP('forum.php', $tVars);
 }