Make some adjustments to blocking behavior regarding the forums:
* Pre-existing bug: on a forum's home page (threads list), if a thread was
created by a blocked user, the thread still appeared with the user's name and
picture visible. Now: their picture and name will be "[unavailable]" but the
thread title/message and link to the thread will remain. Note: in the thread
view itself, posts by the blocked user will be missing as normal.
* Make some tweaks to allow forum moderators (and owners of user-owned forums)
able to see messages from blocked users on their forum:
* In threads: a blocked user's picture and name are "[unavailable]" but the
content of their message is still shown, and can be deleted by moderators.
Misc fixes:
* Private photos: when viewing your granted/grantee lists, hide users whose
accounts are inactive or who are blocked.
* CertifiedSince: in case a user was manually certified but their cert photo
status is not correct, return their user CreatedAt time instead.
* The Explore tab can now sort forums by their:
* Most recently updated thread
* Topics, Posts or Users (counts)
* Show owner information in forum cards
* Passive pagination support for the "My List" on forum home page.
* Only visible when there are >20 favorited Forums.
* The bottoms of threads have moderator buttons now, to easily Pin or
Unpin the thread (for Owners + Admins) or to Lock/Unlock the thread
(all moderators).
Add minimum quotas for users to earn the ability to create custom forums.
The entry requirements that could earn the first forum include:
1. Having a Certified account status for at least 45 days.
2. Having written 10 posts or replies in the forums.
Additional quota is granted in increasing difficulty based on the count of
forum posts created.
Other changes:
* Admin view of Manage Forums can filter for official/community.
* "Certified Since" now shown on profile pages.
* Update FAQ page for Forums feature.
* Add a "Report" link to the footer of forums.
* Allow some non-admin users to view a private forum and its threads.
* Moderators and approved followers can see it
* Note: the endpoint to follow a forum won't let a user invite themselves
to a private forum. Currently there is no way to approve a user except
by also adding them as a moderator.
* Explore and Newest tabs can show these private forums if viewable.
* Private forums: CanBeSeenBy moderators, approved followers, its owner and
admin users.
* Note: the endpoint to subscribe to the forum won't allow users to follow
the private forum, so approved followers can not be created at this time,
except by adding them as moderators.
* Admins: when creating a forum they can choose "no category" to create it as
an unofficial community forum.
* Code cleanup
* More feature flag checking
* The "Newest" tab of the forum is updated with new filter options.
* Which forums: All, Official, Community, My List
* Show: By threads, All posts
* The option for "Which forums" is saved in the user's preferences and set as
their default on future visits, similar to the Site Gallery "Whose photos"
option.
* So users can subscribe to their favorite forums and always get their latest
posts easily while filtering out the rest.
* Forum Moderators
* Add the ability to add and remove moderators for your forum.
* Users are notified when they are added as a moderator.
* Moderators can opt themselves out by unfollowing the forum.
* ForumMembership: add unique constraint on user_id,forum_id.
* Add "Browse" tab to the forums to view them all.
* Text search
* Show all, official, community, or "My List" forums.
* Add a Follow/Unfollow button into the header bar of forums to add it to
"My List"
* On the Categories page, a special "My List" category appears at the top
if the user follows categories, with their follows in alphabetical order.
* On the Categories & Browse pages: forums you follow will have a green
bookmark icon by their name.
Permissions:
* The forum owner is able to Delete comments by others, but not Edit.
Notes:
* Currently a max limit of 100 follow forums (no pagination yet).
Allow regular (non-admin) users access to the Manage Forums page so they can
create and manage their own forums.
Things that were already working:
* The admin forum page was already anticipating regular LoginRequired credential
* Users only see their owned forums, while admins can see and manage ALL forums
Improvements made to the Forum Admin page:
* Change the title color from admin-red to user-blue.
* Add ability to search (filter) and sort the forums.
Other changes:
* Turn the Forum tab bar into a reusable component.
* Add a ChangeLog table to collect historic updates to various database tables.
* Created, Updated (with field diffs) and Deleted actions are logged, as well
as certification photo approves/denies.
* Specific items added to the change log:
* When a user photo is marked Explicit by an admin
* When users block/unblock each other
* When photo comments are posted, edited, and deleted
* When forums are created, edited, and deleted
* When forum comments are created, edited and deleted
* When a new forum thread is created
* When a user uploads or removes their own certification photo
* When an admin approves or rejects a certification photo
* When a user uploads, modifies or deletes their gallery photos
* When a friend request is sent
* When a friend request is accepted, ignored, or rejected
* When a friendship is removed
* Add a Search page to the forums to filter by user ID and find threads and
replies matching your search terms, with "quoted phrases" and -negation
support.
* On user profile pages, add an "Activity" box showing statistics on their
forum threads/comments, likes given/received, photo counts, etc.
* On the "Newest" and Search page for Forums: show an indicator whenever a
post includes an attached photo.
The following bugs are resolved:
* A blocked user comments on a Photo that you have also commented on
(are subscribed to), and you would be notified about their comment.
* A blocked user comments on a Forum Thread that you are subscribed to,
and you would be notified about their post.
* Comments by blocked users (on photos and forum threads) were visible
to you after you have blocked them.
Add a permission system for admin users so you can lock down specific admins to
a narrower set of features instead of them all having omnipotent powers.
* New page: Admin Dashboard -> Admin Permissions Management
* Permissions are handled in the form of 'scopes' relevant to each feature or
action on the site. Scopes are assigned to Groups, and in turn, admin user
accounts are placed in those Groups.
* The Superusers group (scope '*') has wildcard permission to all scopes. The
permissions dashboard has a create-once action to initialize the Superusers
for the first admin who clicks on it, and places that admin in the group.
The following are the exhaustive list of permission changes on the site:
* Moderator scopes:
* Chat room (enter the room with Operator permission)
* Forums (can edit or delete user posts on the forum)
* Photo Gallery (can see all private/friends-only photos on the site
gallery or user profile pages)
* Certification photos (with nuanced sub-action permissions)
* Approve: has access to the Pending tab to act on incoming pictures
* List: can paginate thru past approved/rejected photos
* View: can bring up specific user cert photo from their profile
* The minimum requirement is Approve or else no cert photo page
will load for your admin user.
* User Actions (each action individually scoped)
* Impersonate
* Ban
* Delete
* Promote to admin
* Inner circle whitelist: no longer are admins automatically part of the
inner circle unless they have a specialized scope attached.
The AdminRequired decorator may also apply scopes on an entire admin route.
The following routes have scopes to limit them:
* Forum Admin (manage forums and their settings)
* Remove from inner circle
* Add the PollVotes table and associated logic.
* Multiple choice polls supported.
* Expiring and non-expiring polls.
* Icons and badges on the forum pages to show posts with polls
* Bugfix: non-explicit users getting SQL errors on Newest Posts page.
Got initial Poll table and UI started:
* Polls can be attached to any NEW forum post (can't edit poll details
after creation)
* Max 100 options (theoretically unlimited), expiration time.
* UI: shows radio button list on posts having a poll, no submit handler
yet created.
* Add support to upload a picture to forum posts and replies, in forums that
have the PermitPhotos setting enabled.
* New DB table: CommentPhoto holds the association between a photo and a
forum ID. Photos can be uploaded at preview time (before a CommentID is
available) and get associated to the CommentID on save.
* Cron endpoint /v1/comment-photos/remove-orphaned can clean up orphaned
photos without a CommentID older than 24 hours.
* Add "Photo Boards" as a default forum category for new boards.
* Add a "Newest" tab to the Forums landing page to order ALL forum posts
(comments) by most recent, paginated.
* Add a "Views" cooldown in Redis: viewing the same post multiple times
within 1 hour doesn't ++ the view count with every page load, per user
per thread ID.
* Update the paginators to handle unlimited numbers of pages: shows max
7 page buttons with your current page towards the middle.
* General ability to jump to the "last page" of anything: use a negative
page size like ?page=-1 and it acts like the last page.
* Add "Like" buttons to comments and forum posts.
* Make "private" profiles more private (logged-in users see only their profile
pic, display name, and can friend request or message, if they are not approved
friends of the private user)
* Add "logged-out view" visibility setting to profiles: to share a link to your
page on other sites. Opt-in setting - default is login required to view your
public profile page.
* CSRF cookie fix.
* Updated FAQ & Privacy pages.
* Add ability to (un)subscribe from comment threads on Forums and Photos.
* Creating a forum post, replying to a post or adding a comment to a photo
automatically subscribes you to be notified when somebody else adds a
comment to the thing later.
* At the top of each comment thread is a link to disable or re-enable your
subscription. You can join a subscription without even needing to comment.
If you click to disable notifications, they stay disabled even if you
add another comment later.
Finish implementing the basic forum features:
* Pinned threads (admin or board owner only)
* Edit Thread settings when you edit the top-most comment.
* NoReply threads remove all the reply buttons.
* Explicit forums and threads are filtered out unless opted-in (admins
always see them).
* Count the unique members who participated in each forum.
* Get the most recently updated thread to show on forum list page.
* Contact/Report page: handle receiving a comment ID to report on.
Implement Likes & Notifications
* Like buttons added to Photos and Profile Pages. Implemented via simple
vanilla JS (likes.js) to make ajax requests to back-end to like/unlike.
* Notifications: for your photo or profile being liked. If you unlike,
the existing notifications about the like are revoked.
* The notifications appear as an alert number in the nav bar and are read
on the User Dashboard. Click to mark a notification as "read" or click
the "mark all as read" button.
Update DeleteUser to scrub likes, notifications, threads, and comments.
Adds initial code for basically functional forums:
* Forums landing page shows hard-coded list of Categories along with any
forums in the DB that use those categories.
* Admin: Create, Edit forums and view forums you own or have admin rights
to modify.
* Landing page forums list shows the title/description and dynamic count of
number of Topics and total number of Posts in each forum. TODO: distinct
count of Users who posted in each forum.
* Board Index page shows list of Threads (posts) with a Replies count and
Views count on each thread.
* Thread view is basically an array of Comments. Users can post, edit and
delete (their own) comments. Deleting the first comment removes the
entire Thread - the thread points to a first Comment to provide its body.
* Reply and Quote-Reply options working.