From 64ee5ff9c43b46e6d76f97af4fa2789cd9ea43b3 Mon Sep 17 00:00:00 2001 From: Cflip <36554078+cflip@users.noreply.github.com> Date: Thu, 28 Jan 2021 11:15:59 -0700 Subject: Fixes and style changes --- styles/style.css | 5 +++++ thread.php | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/styles/style.css b/styles/style.css index f83a9b6..0455b46 100644 --- a/styles/style.css +++ b/styles/style.css @@ -128,12 +128,17 @@ th a:hover { .youtube-embed { width: 480px; height: 270px; + border: none; } .image-embed { width: 480px; } +.greentext { + color: darkolivegreen; +} + h1, h4 { margin-top: 2px; margin-bottom: 10px; diff --git a/thread.php b/thread.php index 7eb0e88..d6d01f8 100644 --- a/thread.php +++ b/thread.php @@ -15,6 +15,10 @@ function add_quote($dbc, $thread_id, $matches) { $reply = mysqli_fetch_assoc($result); + if (empty($reply)) { + return '
Invalid quote!
'; + } + return '
Quote from ' . $reply['user_name'] . '
' . $reply['post_content'] . '
'; } } @@ -69,7 +73,7 @@ if (mysqli_num_rows($result) == 0) { '
', $post_content); $post_content = preg_replace('/(https?:\/\/[^ ]+?(?:\.jpg|\.png|\.gif))/', '$1', $post_content); - + //$post_content = preg_replace('/^>/', 'garb', $post_content); $post_content = preg_replace('@\b(http(s)?://)?([^\s]*?(?:\.[a-z\d?=/_-]+)+)(?![^<]*?(?:|/?>))@i', '$0', $post_content); echo '' . $post_content . ''; -- cgit v1.2.3