forked from root/threadr.lostcave.ddnss.de
added "id=" for jump links in replies
parent
a9eb39f179
commit
3d2053c337
|
@ -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)
|
||||
|
|
|
@ -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 "<section>
|
||||
echo "<section id=\"$post_id\" >
|
||||
<h1>$post_title</h1>
|
||||
<article>
|
||||
<header>
|
||||
|
|
Loading…
Reference in New Issue