Fixed links for mod pages
This commit is contained in:
parent
33c27ce7fa
commit
dcaeb7a81a
@ -108,7 +108,7 @@
|
|||||||
|
|
||||||
// File info
|
// File info
|
||||||
if(!empty($this->file)) {
|
if(!empty($this->file)) {
|
||||||
$built .= '<p class="fileinfo">File: <a href="' . $this->root . $board['dir'] . DIR_IMG . $this->file .'">' . $this->file . '</a> <span class="unimportant">(' .
|
$built .= '<p class="fileinfo">File: <a href="' . ROOT . $board['dir'] . DIR_IMG . $this->file .'">' . $this->file . '</a> <span class="unimportant">(' .
|
||||||
// Filesize
|
// Filesize
|
||||||
format_bytes($this->filesize) . ', ' .
|
format_bytes($this->filesize) . ', ' .
|
||||||
// File dimensions
|
// File dimensions
|
||||||
@ -121,7 +121,7 @@
|
|||||||
// Filename
|
// Filename
|
||||||
$built .= ', ' . $this->filename . ')</span></p>' .
|
$built .= ', ' . $this->filename . ')</span></p>' .
|
||||||
// Thumbnail
|
// Thumbnail
|
||||||
'<a href="' . $this->root . $board['dir'] . DIR_IMG . $this->file.'"><img src="' . $this->root . $board['dir'] . DIR_THUMB . $this->thumb.'" style="width:'.$this->thumbx.'px;height:'.$this->thumby.'px;" /></a>';
|
'<a href="' . ROOT . $board['dir'] . DIR_IMG . $this->file.'"><img src="' . ROOT . $board['dir'] . DIR_THUMB . $this->thumb.'" style="width:'.$this->thumbx.'px;height:'.$this->thumby.'px;" /></a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Body
|
// Body
|
||||||
@ -162,7 +162,7 @@
|
|||||||
public function build($index=false) {
|
public function build($index=false) {
|
||||||
global $board, $mod;
|
global $board, $mod;
|
||||||
|
|
||||||
$built = '<p class="fileinfo">File: <a href="' . $this->root . $board['dir'] . DIR_IMG . $this->file .'">' . $this->file . '</a> <span class="unimportant">(' .
|
$built = '<p class="fileinfo">File: <a href="' . ROOT . $board['dir'] . DIR_IMG . $this->file .'">' . $this->file . '</a> <span class="unimportant">(' .
|
||||||
// Filesize
|
// Filesize
|
||||||
format_bytes($this->filesize) . ', ' .
|
format_bytes($this->filesize) . ', ' .
|
||||||
// File dimensions
|
// File dimensions
|
||||||
@ -175,7 +175,7 @@
|
|||||||
// Filename
|
// Filename
|
||||||
$built .= ', ' . $this->filename . ')</span></p>' .
|
$built .= ', ' . $this->filename . ')</span></p>' .
|
||||||
// Thumbnail
|
// Thumbnail
|
||||||
'<a href="' . $this->root . $board['dir'] . DIR_IMG . $this->file.'"><img src="' . $this->root . $board['dir'] . DIR_THUMB . $this->thumb.'" style="width:'.$this->thumbx.'px;height:'.$this->thumby.'px;" /></a>';
|
'<a href="' . ROOT . $board['dir'] . DIR_IMG . $this->file.'"><img src="' . ROOT . $board['dir'] . DIR_THUMB . $this->thumb.'" style="width:'.$this->thumbx.'px;height:'.$this->thumby.'px;" /></a>';
|
||||||
|
|
||||||
$built .= '<div class="post op"><p class="intro"' . (!$index?' id="' . $this->id . '"':'') . '>';
|
$built .= '<div class="post op"><p class="intro"' . (!$index?' id="' . $this->id . '"':'') . '>';
|
||||||
|
|
||||||
|
@ -135,7 +135,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function index($page) {
|
function index($page, $mod) {
|
||||||
global $sql, $board;
|
global $sql, $board;
|
||||||
|
|
||||||
$body = '';
|
$body = '';
|
||||||
@ -151,7 +151,7 @@
|
|||||||
|
|
||||||
if(mysql_num_rows($query) < 1 && $page > 1) return false;
|
if(mysql_num_rows($query) < 1 && $page > 1) return false;
|
||||||
while($th = mysql_fetch_array($query)) {
|
while($th = mysql_fetch_array($query)) {
|
||||||
$thread = new Thread($th['id'], $th['subject'], $th['email'], $th['name'], $th['trip'], $th['body'], $th['time'], $th['thumb'], $th['thumbwidth'], $th['thumbheight'], $th['file'], $th['filewidth'], $th['fileheight'], $th['filesize'], $th['filename'], $th['ip']);
|
$thread = new Thread($th['id'], $th['subject'], $th['email'], $th['name'], $th['trip'], $th['body'], $th['time'], $th['thumb'], $th['thumbwidth'], $th['thumbheight'], $th['file'], $th['filewidth'], $th['fileheight'], $th['filesize'], $th['filename'], $th['ip'], $mod ? '?/' : null);
|
||||||
|
|
||||||
$newposts = mysql_query(sprintf(
|
$newposts = mysql_query(sprintf(
|
||||||
"SELECT `id`, `subject`, `email`, `name`, `trip`, `body`, `time`, `thumb`, `thumbwidth`, `thumbheight`, `file`, `filewidth`, `fileheight`, `filesize`, `filename`,`ip` FROM `posts_%s` WHERE `thread` = '%s' ORDER BY `time` DESC LIMIT %d",
|
"SELECT `id`, `subject`, `email`, `name`, `trip`, `body`, `time`, `thumb`, `thumbwidth`, `thumbheight`, `file`, `filewidth`, `fileheight`, `filesize`, `filename`,`ip` FROM `posts_%s` WHERE `thread` = '%s' ORDER BY `time` DESC LIMIT %d",
|
||||||
@ -173,7 +173,7 @@
|
|||||||
unset($omitted);
|
unset($omitted);
|
||||||
}
|
}
|
||||||
while($po = mysql_fetch_array($newposts)) {
|
while($po = mysql_fetch_array($newposts)) {
|
||||||
$thread->add(new Post($po['id'], $th['id'], $po['subject'], $po['email'], $po['name'], $po['trip'], $po['body'], $po['time'], $po['thumb'], $po['thumbwidth'], $po['thumbheight'], $po['file'], $po['filewidth'], $po['fileheight'], $po['filesize'], $po['filename'], $po['ip']));
|
$thread->add(new Post($po['id'], $th['id'], $po['subject'], $po['email'], $po['name'], $po['trip'], $po['body'], $po['time'], $po['thumb'], $po['thumbwidth'], $po['thumbheight'], $po['file'], $po['filewidth'], $po['fileheight'], $po['filesize'], $po['filename'], $po['ip'], $mod ? '?/' : null));
|
||||||
}
|
}
|
||||||
mysql_free_result($newposts);
|
mysql_free_result($newposts);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user