diff --git a/threadr/board/README.md b/threadr/board/README.md index a7ca23d..9e69e38 100644 --- a/threadr/board/README.md +++ b/threadr/board/README.md @@ -5,6 +5,7 @@ $_GET values: * id → the board id * action → what action file should be loaded in the bottom section (see below) * valid actions: [not present], post, submit, edit + * end → if present, jump to the end of the page ### [board.php](./board.php) the top part of a board page, displays the posts, loaded via include() ### [post.php](./post.php) diff --git a/threadr/board/board.php b/threadr/board/board.php index ce91911..31dd1e3 100644 --- a/threadr/board/board.php +++ b/threadr/board/board.php @@ -10,10 +10,11 @@ foreach($statement->fetchAll() as $ROW) { $post_creator = $statement->fetch(); // get post content and make sure it doesn't mess with the website - $post_title = htmlspecialchars($ROW['title']); + $post_id = $ROW['id']; + $post_title = htmlspecialchars($ROW['title']); $post_creator_name = htmlspecialchars($post_creator['name']); - $post_time = htmlspecialchars($ROW['post_time']); - $post_content = htmlspecialchars($ROW['content']); + $post_time = htmlspecialchars($ROW['post_time']); + $post_content = htmlspecialchars($ROW['content']); // add line breaks to post content, to be replaced with proper makrdown support in the future (see #44) $newlines = array("\r\n", "\n\r", "\r", "\n"); // two-character newlines first to prevent placing two line breaks instead of one @@ -22,7 +23,7 @@ foreach($statement->fetchAll() as $ROW) { // post id of the original post this is a reply to, negative numbers mean no reply $reply_to = $ROW['reply_to']; - echo "
+ echo "

$post_title