From aab95da24def6a3d4579b1551c74d817f79ec10c Mon Sep 17 00:00:00 2001 From: Savetheinternet Date: Tue, 30 Nov 2010 19:59:35 +1100 Subject: [PATCH] Multi-board support. --- inc/display.php | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/inc/display.php b/inc/display.php index 6156e6cf..35110cd6 100644 --- a/inc/display.php +++ b/inc/display.php @@ -20,13 +20,14 @@ } function error($message) { + global $board; die(Element('page.html', Array( 'index'=>ROOT, 'title'=>'Error', 'subtitle'=>'An error has occured.', 'body'=>"
" . "

$message

" . - "

Go back.

" . + "

Go back.

" . "
" ))); } @@ -51,6 +52,8 @@ $this->filename = $filename; } public function build($index=false) { + global $board; + $built = '
' . '

'; @@ -75,14 +78,14 @@ $built .= ' No.' . + ' href="' . ROOT . $board['dir'] . DIR_RES . $this->thread . '.html' . '#' . $this->id . '">No.' . // JavaScript cite ''.$this->id.'' . '

'; // File info if(!empty($this->file)) { - $built .= '

File: ' . $this->file . ' (' . + $built .= '

File: ' . $this->file . ' (' . // Filesize format_bytes($this->filesize) . ', ' . // File dimensions @@ -95,7 +98,7 @@ // Filename $built .= ', ' . $this->filename . ')

' . // Thumbnail - ''; + ''; } // Body @@ -132,7 +135,9 @@ public function build($index=false) { - $built = '

File: ' . $this->file . ' (' . + global $board; + + $built = '

File: ' . $this->file . ' (' . // Filesize format_bytes($this->filesize) . ', ' . // File dimensions @@ -145,7 +150,7 @@ // Filename $built .= ', ' . $this->filename . ')

' . // Thumbnail - ''; + ''; $built .= '

'; @@ -170,11 +175,11 @@ $built .= ' No.' . + ' href="' . ROOT . $board['dir'] . DIR_RES . $this->id . '.html' . '#' . $this->id . '">No.' . // JavaScript cite - ''.$this->id.'' . + ''.$this->id.'' . // [Reply] - ($index ? '[Reply]' : '') . + ($index ? '[Reply]' : '') . '

'; // Body