Adds "noko50" (View Last 50 Posts) pages. (Broken Reply)

This commit is contained in:
fallenPineapple 2013-08-10 17:16:30 -04:00
parent 1248e329d2
commit 12ee85beaf
7 changed files with 152 additions and 8 deletions

View file

@ -416,6 +416,9 @@ class Thread {
public function add(Post $post) {
$this->posts[] = $post;
}
public function postCount() {
return count($this->posts) + $this->omitted;
}
public function postControls() {
global $board, $config;
@ -483,10 +486,12 @@ class Thread {
return fraction($this->filex, $this->filey, ':');
}
public function build($index=false) {
public function build($index=false, $isnoko50=false) {
global $board, $config, $debug;
$built = Element('post_thread.html', array('config' => $config, 'board' => $board, 'post' => &$this, 'index' => $index));
$hasnoko50 = $this->postCount() >= $config['noko50_min'];
$built = Element('post_thread.html', array('config' => $config, 'board' => $board, 'post' => &$this, 'index' => $index, 'hasnoko50' => $hasnoko50, 'isnoko50' => $isnoko50));
return $built;
}