From 1fa856d075bd567b3f318c7ac2117b94ee9cf34a Mon Sep 17 00:00:00 2001 From: Trawlnetter <250747469+Trawlnetter@users.noreply.github.com> Date: Mon, 22 Dec 2025 00:33:31 +0000 Subject: [PATCH] Redesign the small footer of a review - Add "Direct link" to the small footer - Changed order of links in the small footer - Changed wording of small footer messages slightly - Replaced "View comments (x) - Add a comment" with just "View comments" in the footer of a review with comments - Add "title" attribute to some links in the small footer --- www/reviews.php | 62 +++++++++++++++++++++++++++++++------------------ 1 file changed, 39 insertions(+), 23 deletions(-) diff --git a/www/reviews.php b/www/reviews.php index 8e668445..cb925481 100644 --- a/www/reviews.php +++ b/www/reviews.php @@ -436,7 +436,7 @@ function showReview($db, $gameid, $rec, $specialNames, $optionFlags = 0) } // set up the comment controls, if applicable - $commentCtls = $barCommentCtl = ""; + $commentCtls = $barCommentCtls = ""; if ($showCommentCtls && ($curuser == $userid || ($dfltComments && $showVoteCtls))) { @@ -450,19 +450,30 @@ function showReview($db, $gameid, $rec, $specialNames, $optionFlags = 0) } // set up the for adding a comment - $addCommentLink = ""; + $addCommentLink = ""; // generate the controls, depending on the existing comment count - if ($commentCount == 0) { - $commentCtls = "{$addCommentLink}Add a comment"; - } else { - $commentCtls = - "" - . "View comments ($commentCount) - " - . "{$addCommentLink}Add comment"; + if ($curuser) { + if ($commentCount == 0) { + $commentCtls = "{$addCommentLink}Add a comment"; + } else { + $commentCtls = " + View comments ($commentCount)"; + } + } + else { + if ($commentCount > 0) { + $commentCtls = " + View comments ($commentCount)"; + } } - $barCommentCtls = "| $commentCtls"; + if ($commentCtls) { + $barCommentCtls = "| $commentCtls"; + } } // add any special notes @@ -483,15 +494,18 @@ function showReview($db, $gameid, $rec, $specialNames, $optionFlags = 0) if ($curuser == $userid) { echo "