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 "
+ Direct link + $barCommentCtls | You wrote this review - Revise it - | Direct link $barCommentCtls
"; + "; } else if ($specialCode == 'external') { if ($xurl) - echo "" - . "See the full review
"; + echo " + See the full review
"; } else if (!$isSpecial && $showVoteCtls) { @@ -506,13 +520,16 @@ function showReview($db, $gameid, $rec, $specialNames, $optionFlags = 0) } global $nonce; - echo "
"; + echo "
+ Direct link + $barCommentCtls | "; if (!$curuser) { - echo "You can log in " - . "to rate this review, mute this user, or add a comment."; + echo "Log in " + . "to comment, rate this review, or mute this user."; } else { - echo "Was this review helpful to you?   " + echo "Was this review helpful?   " . "" . addEventListener('click', "sendReviewVote('$reviewid', 'Y'); return false;") . "Yes   " @@ -561,9 +578,6 @@ function showReview($db, $gameid, $rec, $specialNames, $optionFlags = 0) . "title=\"Notify moderators that this review violates " . "the community guidelines\">Flag as inappropriate" . "" - . "Direct link" - . "" . "" . "" . "View my user filters" @@ -575,7 +589,6 @@ function showReview($db, $gameid, $rec, $specialNames, $optionFlags = 0) . "
" . "
" - . " $barCommentCtls" . " " . "" . "