From 8136c2508f12ee9d50e77f83dd53ea2081143be0 Mon Sep 17 00:00:00 2001 From: khuxkm Date: Sun, 4 Nov 2018 10:38:39 -0500 Subject: [PATCH 1/2] Begin work on fixing mentions. --- client/thread.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/client/thread.php b/client/thread.php index 091fccf..22270f6 100644 --- a/client/thread.php +++ b/client/thread.php @@ -1,4 +1,13 @@ >OP"; + } + return ">>".$postnum.$usermap[$data["messages"][$postnum]["author"]]["user_name"]; + } foreach($thread["data"]["messages"] as $message) { $username = $thread["usermap"][$message["author"]]["user_name"]; $time = round($message['created']); @@ -7,7 +16,8 @@ echo "\t\t
".PHP_EOL; echo "\t\t\t

>{$message['post_id']} {$username} @ {$time}

".PHP_EOL; echo "\t\t\t
";
-		echo str_replace(">>0",">>OP",$message["body"]).PHP_EOL;
+//		echo str_replace(">>0",">>OP",$message["body"]).PHP_EOL;
+		echo preg_replace_callback("/>>(\d+)/",'lookup',$message["body"]).PHP_EOL;
 		echo "
".PHP_EOL; echo "\t\t
".PHP_EOL; } From e7f847a4fff218464df32962916f48ca3aae4c0b Mon Sep 17 00:00:00 2001 From: khuxkm fbexl Date: Tue, 8 Oct 2019 11:19:16 -0400 Subject: [PATCH 2/2] Float pinned posts to the top --- client/main.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/client/main.php b/client/main.php index b99fddb..b416a86 100644 --- a/client/main.php +++ b/client/main.php @@ -1,7 +1,8 @@ $thread_b["last_mod"])? -1 : 1);