forked from CMU-17313Q/cmu-17313q-f24-nodebb-f24-NodeBB
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Tasnim1147
merged 12 commits into
CMU-17313Q:f24
from
jdufitum:task3/db-anonymous-name-change
Sep 26, 2024
Merged
Task 3: Database Changes for Displaying Anonymous User Names in Posts #36
Tasnim1147
merged 12 commits into
CMU-17313Q:f24
from
jdufitum:task3/db-anonymous-name-change
Sep 26, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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.
Tasnim1147
approved these changes
Sep 26, 2024
There was a problem hiding this 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
.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.