diff --git a/inc/functions.php b/inc/functions.php index 33ec6fc..39613b5 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -181,8 +181,8 @@ function writePage($filename, $contents) { } function fixLinksInRes($html) { - $search = array(' href="css/', ' href="src/', ' href="thumb/', ' href="res/', ' href="imgboard.php', ' href="favicon.ico', 'src="thumb/', ' action="imgboard.php'); - $replace = array(' href="../css/', ' href="../src/', ' href="../thumb/', ' href="../res/', ' href="../imgboard.php', ' href="../favicon.ico', 'src="../thumb/', ' action="../imgboard.php'); + $search = array(' href="css/', ' src="js/', ' href="src/', ' href="thumb/', ' href="res/', ' href="imgboard.php', ' href="favicon.ico', 'src="thumb/', ' action="imgboard.php'); + $replace = array(' href="../css/', ' src="../js/', ' href="../src/', ' href="../thumb/', ' href="../res/', ' href="../imgboard.php', ' href="../favicon.ico', 'src="../thumb/', ' action="../imgboard.php'); return str_replace($search, $replace, $html); } diff --git a/inc/html.php b/inc/html.php index 9f0c422..8b2bad9 100644 --- a/inc/html.php +++ b/inc/html.php @@ -16,6 +16,7 @@ EOF; + @@ -71,7 +72,13 @@ function supportedFileTypes() { function buildPost($post, $res) { $return = ""; $threadid = ($post['parent'] == TINYIB_NEWTHREAD) ? $post['id'] : $post['parent']; - $postlink = ($res == TINYIB_RESPAGE) ? ($threadid . '.html#' . $post['id']) : ('res/' . $threadid . '.html#' . $post['id']); + + if ($res == TINYIB_RESPAGE) { + $reflink = "No.{$post['id']}"; + } else { + $reflink = "No.{$post['id']}"; + } + if (!isset($post["omitted"])) { $post["omitted"] = 0; } @@ -110,7 +117,7 @@ EOF; ${post["nameblock"]} - No.${post["id"]} + $reflink EOF; @@ -281,7 +288,7 @@ EOF; Message