Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add preference for showing absolute dates on forum posts #1656

Merged
merged 8 commits into from
Jul 15, 2023

Conversation

wescopeland
Copy link
Member

This PR adds a new websitePrefs value for always showing absolute UTC timestamps on forum posts.

UX Highlights

  • A small new section has been added on the user settings page which has a table containing a single row housing this new preference, titled "Show absolute dates on forum posts".
  • When checked, timeago-style timestamps are no longer used on forum posts or recent forum activity displays. The UTC timestamp is shown instead.

Technical Implementation

  • Forum_ShowAbsoluteDates has been added to the UserPreference enum.
  • update-notification.php has been renamed to update-preferences.php.
  • Anywhere forum content is shown with a timestamp, a conditional executes to determine if that timestamp should be timeago-style or absolute-style.

Screenshots
Screenshot 2023-07-09 at 9 51 06 AM

Screenshot 2023-07-09 at 9 50 48 AM

Screenshot 2023-07-09 at 9 50 57 AM

Screenshot 2023-07-09 at 9 50 42 AM

@wescopeland wescopeland requested a review from Jamiras July 9, 2023 13:57
@wescopeland wescopeland requested a review from luchaos July 11, 2023 21:25
@wescopeland wescopeland requested a review from Jamiras July 13, 2023 01:07
public/controlpanel.php Outdated Show resolved Hide resolved
@Jamiras Jamiras merged commit ad6cd1c into RetroAchievements:master Jul 15, 2023
@wescopeland wescopeland deleted the relative-dates-setting branch July 15, 2023 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants