From b3bb0b898d3178963fefb9c0b16a00a76cf2a034 Mon Sep 17 00:00:00 2001 From: Hannah Isopod Date: Wed, 11 Jun 2025 03:25:00 -0600 Subject: total guestbook overhaul + new blog post + etc - Added /about/pronouns/ in leiu of something like a pronouns.cc profile - New blog post about my new and improved AI opinions - Moved Stop Using Chromium to an actual blog post page - Blog posts now have previous and next buttons - New /blog/ background - Moved status.cafe widget from /blog/ to landing page - Total overhaul of guestbook: - Merged guestbook and blog comment section code - Beefed up bot protection - Added a word filter - Added a property to entries to facilitate holding comments for review and approving or denying them manually (The interface for this is somewhere else) - IP address from which a post originates is now tracked in order to IP ban malicious actors - Various new buttons - Updated /greenhouse/ - The site is now a member of the No AI Webring - a couple minor CSS fixes --- guestbook/comments.php | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 guestbook/comments.php (limited to 'guestbook/comments.php') diff --git a/guestbook/comments.php b/guestbook/comments.php new file mode 100644 index 0000000..3f65fb9 --- /dev/null +++ b/guestbook/comments.php @@ -0,0 +1,46 @@ +setSafeMode(true); + } + + $totaloutput = ""; + $postlist = json_decode(file_get_contents($datadir."posts.json")); + $index = 1; + foreach($postlist as $post) { + if($post->entry === $page and $post->modstatus > 0) { + $output = ""; + $date = date("Y-m-d h:iA", $post->date); + $name = htmlentities($post->name); + $message = $Parsedown->text($post->message); + $found = htmlentities($post->found); + $website = $post->website; + $cool = $post->cool; + $coolsanitized = htmlentities(preg_replace("/https?:\/\//i", "", $cool)); + $reply = $Parsedown->text($post->reply); + + $output = $output."
"; + if($website) { $output = $output."$name"; } + else { $output = $output.$name; } + $output = $output."
$date
Entry #$index
"; + if($cool) { + $output = $output."
cool thing: $coolsanitized
"; + } + if($found) { + $output = $output."
How did you find me?
$found
"; + } + $output = $output."
$message
"; + if($reply) { + $output = $output."
Reply:$reply
"; + } + $output = $output."
"; + $index++; + $totaloutput = $output.$totaloutput; + } + } + echo $totaloutput; +} + -- cgit v1.2.3