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

Task 3: Database Changes for Displaying Anonymous User Names in Posts #36

Merged
merged 12 commits into from
Sep 26, 2024

Conversation

jdufitum
Copy link

This pull request addresses the handling of anonymous user names within the post template. The following changes were made in the post.tpl file to modify the display logic based on the annonymousType flag:

File: ./node_modules/nodebb-theme-harmony/templates/partials/topic/post.tpl
Line 11: Added an if-else-end condition to check the annonymousType flag.
If the annonymousType is "None", the user's avatar and profile link are displayed as normal.
If the annonymousType is set, an anonymous avatar and an empty link are shown.
Line 35: Similar if-else-end condition added for the user display name and profile link.
If annonymousType is "None", the user's display name and link to their profile are shown.
If the user is anonymous, it displays "Anonymous-{posts.annonymousType}" without a link.

jdufitum and others added 12 commits September 23, 2024 21:30
- File: ./node_modules/nodebb-theme-harmony/templates/partials/topic/post.tpl
- Lines: ~11, ~35

Changes:
1. Added if-else-end condition to check for annonymousType flag at line 11:
   - Display user avatar and profile link if annonymousType is "None".
   - Display anonymous avatar and empty link otherwise.

2. Added if-else-end condition to check for annonymousType flag at line 35:
   - Display user display name and profile link if annonymousType is "None".
   - Display "Anonymous-{posts.annonymousType}" and empty link otherwise.
- File: ./node_modules/nodebb-theme-harmony/templates/partials/topic/post.tpl
- Lines: ~11, ~35

Changes:
1. Added if-else-end condition to check for annonymousType flag at line 11:
   - Display user avatar and profile link if annonymousType is "None".
   - Display anonymous avatar and empty link otherwise.

2. Added if-else-end condition to check for annonymousType flag at line 35:
   - Display user display name and profile link if annonymousType is "None".
   - Display "Anonymous-{posts.annonymousType}" and empty link otherwise.
@jdufitum jdufitum added this to the Sprint 1 milestone Sep 26, 2024
@jdufitum jdufitum requested a review from Tasnim1147 September 26, 2024 19:23
@jdufitum jdufitum linked an issue Sep 26, 2024 that may be closed by this pull request
@jdufitum jdufitum self-assigned this Sep 26, 2024
Copy link

@Tasnim1147 Tasnim1147 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. However it would be better if you just added the specific file that was assigned to you for changes while doing git add.

@Tasnim1147 Tasnim1147 merged commit a8575f8 into CMU-17313Q:f24 Sep 26, 2024
1 check passed
@jdufitum jdufitum added the Task label Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Database Changes Changing name as anonymous
2 participants