From c9732788143886b611cb2fecfb53daf3d8add48f Mon Sep 17 00:00:00 2001 From: cflip <36554078+cflip@users.noreply.github.com> Date: Wed, 24 Mar 2021 18:29:41 -0600 Subject: Show latest thread/post on pages --- index.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index 6c1c0c9..b4b00a1 100644 --- a/index.php +++ b/index.php @@ -38,6 +38,8 @@ usort($categories, "cmp"); foreach ($categories as $category) { + $latest_thread = $category->get_latest_thread($dbc); + echo ''; echo ''; echo '' . $category->name . ''; @@ -45,7 +47,8 @@ echo ''; echo '' . $category->thread_count . ''; echo '' . $category->post_count . ''; - echo 'my supercool thread
by cflip, 3 days ago'; + echo '' . $latest_thread->subject . '
'; + echo 'by ' . $latest_thread->author->name . ', ' . $latest_thread->date_created . ''; echo ''; } ?> -- cgit v1.2.3