From c06300a1fbd2be40a825af5e4f8a5cd31d8edc38 Mon Sep 17 00:00:00 2001 From: BodgeMaster <> Date: Tue, 7 Sep 2021 07:53:22 +0200 Subject: [PATCH] adding reply links --- threadr/board/board.php | 9 +++++++-- threadr/style.css | 7 +++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/threadr/board/board.php b/threadr/board/board.php index 31dd1e3..eba2dc9 100644 --- a/threadr/board/board.php +++ b/threadr/board/board.php @@ -20,11 +20,16 @@ foreach($statement->fetchAll() as $ROW) { $newlines = array("\r\n", "\n\r", "\r", "\n"); // two-character newlines first to prevent placing two line breaks instead of one $post_content = str_replace($newlines, "
", $post_content); - // post id of the original post this is a reply to, negative numbers mean no reply + // if this is a reply, build reference $reply_to = $ROW['reply_to']; + if ($reply_to > -1) { + $reply_reference = "

This is a reply to this message.

" + } else { + $reply_reference = "" + } echo "
-

$post_title

+

$post_title

diff --git a/threadr/style.css b/threadr/style.css index 10a0877..3c67d23 100644 --- a/threadr/style.css +++ b/threadr/style.css @@ -388,3 +388,10 @@ header { padding: 40px 40px 10px 40px; box-shadow: 0px 4px 8px 0px rgba(0,0,0,0.2); } + +h1.post{ + margin: 0; +} +p.post_reply { + margin: 0.1em; +}