public function process() { /* up view count and mark read */ $this->view(); $this->markRead(); /* get posts */ $this->getAnswers(); $this->getPosts(); $this->getLastPost(); $this->setPlaceholder('rtl', $this->board->get('rtl')); $threadArray = $this->thread->toArray('', true, true); $this->setPlaceholders($threadArray); $this->setPlaceholder('title', $this->thread->get('title')); $this->setPlaceholder('title_value', $threadArray['title']); $this->setPlaceholder('views', number_format($this->getPlaceholder('views', 1))); $this->setPlaceholder('replies', number_format($this->getPlaceholder('replies', 0))); $this->setPlaceholder('url', $this->thread->getUrl(false, array(), true)); /* set css class of thread */ $this->thread->buildCssClass(); $this->getQuickReplyForm(); if ($this->discuss->user->isLoggedIn && empty($this->scriptProperties['print'])) { $this->getActionButtons(); } if ($this->discuss->user->isLoggedIn && ($this->isModerator || $this->isAdmin) && empty($this->scriptProperties['print'])) { $this->getModeratorActionButtons(); } /* output */ $this->setPlaceholder('discuss.error_panel', $this->discuss->getChunk('Error')); $this->setPlaceholder('discuss.thread', $this->thread->get('title')); $this->buildPagination(); $this->getViewing(); $this->fireOnRenderThread(); }
public function process() { $this->view(); $this->thread->buildCssClass(); $this->getQuickReplyForm(); $threadArray = $this->thread->toArray(); $threadArray['url'] = $this->thread->getUrl(false); $threadArray['views'] = number_format($threadArray['views']); $threadArray['replies'] = number_format($threadArray['replies']); $this->setPlaceholders($threadArray); $this->markAsRead(); $this->getThreadPosts(); $this->getLastPost(); $this->getViewing(); $this->buildPagination(); $this->getActionButtons(); $this->setPlaceholder('discuss.error_panel', $this->discuss->getChunk('Error')); $this->setPlaceholder('discuss.thread', $this->thread->get('title')); }