adding reply links
parent
6c5eb39f96
commit
c06300a1fb
|
@ -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
|
$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, "<br />", $post_content);
|
$post_content = str_replace($newlines, "<br />", $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'];
|
$reply_to = $ROW['reply_to'];
|
||||||
|
if ($reply_to > -1) {
|
||||||
|
$reply_reference = "<p class=\"post_reply\" >This is a reply to <a href=./?id=$_GET['id']#$reply_to >this</a> message.</p>"
|
||||||
|
} else {
|
||||||
|
$reply_reference = ""
|
||||||
|
}
|
||||||
|
|
||||||
echo "<section id=\"$post_id\" >
|
echo "<section id=\"$post_id\" >
|
||||||
<h1>$post_title</h1>
|
<h1 class=\"post\">$post_title</h1>
|
||||||
<article>
|
<article>
|
||||||
<header>
|
<header>
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -388,3 +388,10 @@ header {
|
||||||
padding: 40px 40px 10px 40px;
|
padding: 40px 40px 10px 40px;
|
||||||
box-shadow: 0px 4px 8px 0px rgba(0,0,0,0.2);
|
box-shadow: 0px 4px 8px 0px rgba(0,0,0,0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h1.post{
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
p.post_reply {
|
||||||
|
margin: 0.1em;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue