Making WordPress.org

Opened 8 years ago

Closed 7 years ago

Last modified 6 years ago

#2272 closed enhancement (fixed)

Allow moderators to add notes to users

Reported by: clorith's profile Clorith Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: Priority: normal
Component: Support Forums Keywords: has-patch
Cc:

Description

Patch with initial fork of user notes plugin for bbPress.

Functionality:

  • Show notes in-post for a user
  • Notes are hidden by default, with a toggle under the persons gravatar
  • Notes are linked to the post they were created from, as well as who wrote the note and when
  • Notes can also be seen on a persons bbPress profile

Notes are stored in usermeta, this ties them easily to a user without needing the flexibility of a custom post type. If it gets to the point where there's so many notes on a user that that it becomes unmanageable as a usermeta I would instead lean towards handling the user and it's a problem on the moderation side more so than the need for more flexibility.

Notes shown in-post for a user (textarea for adding a new note is appended at the bottom of the notes):
http://imgur.com/VeE7NIc.png

The notes shown on a profile page (Notes are always displayed for moderators on profiles):
http://imgur.com/MZeAavM.png

Attachments (5)

2272.patch (11.4 KB) - added by Clorith 8 years ago.
no-notes.PNG (24.7 KB) - added by SergeyBiryukov 7 years ago.
notes-in-post.PNG (30.3 KB) - added by SergeyBiryukov 7 years ago.
notes-in-profile.PNG (14.3 KB) - added by SergeyBiryukov 7 years ago.
notes-wporg-forums.PNG (34.0 KB) - added by SergeyBiryukov 7 years ago.

Download all attachments as: .zip

Change History (28)

@Clorith
8 years ago

#1 @Clorith
8 years ago

  • Keywords has-patch added

This ticket was mentioned in Slack in #forums by sergey. View the logs.


8 years ago

This ticket was mentioned in Slack in #forums by macmanx. View the logs.


7 years ago

#4 @SergeyBiryukov
7 years ago

  • Owner set to SergeyBiryukov
  • Status changed from new to accepted

#5 @SergeyBiryukov
7 years ago

Adjusted 2272.patch for the new theme with a couple enhancements:

  • No notes added yet: no-notes.PNG
  • User notes in a topic or reply: notes-in-post.PNG
  • User notes in profile: notes-in-profile.PNG
  • Added "Edit" and "Delete" functionality.
  • Notes can be added directly on profile pages as well.
  • Notes are auto-expanded when adding, editing, or deleting a note.

Looks OK in the old theme as well, which is still in use on some Rosetta sites: notes-wporg-forums.PNG.

Commits will follow shortly.

#6 @SergeyBiryukov
7 years ago

In 5640:

Support Theme: Add styling for user notes toggle.

See #2272.

#7 @SergeyBiryukov
7 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 5641:

Support Forums: Allow moderators to add notes to users.

Props Clorith for initial patch.
Fixes #2272.

#8 @SergeyBiryukov
7 years ago

In 5645:

Support Forums: Display user notes before post content, closer to "Toggle user notes" link.

Remove unused $post_id variable from ::delete_user_note().

See #2272.

#9 @SergeyBiryukov
7 years ago

In 5646:

Support Forums: Store site ID in addition to post ID associated with a note, as post IDs are not unique across Rosetta forums.

See #2272.

#10 @SergeyBiryukov
7 years ago

In 5647:

Support Forums: When editing a link, only save new text, don't overwrite existing meta data.

Don't show "Edit" or "Delete" links for notes made on another forum.

See #2272.

#11 @SergeyBiryukov
7 years ago

In 5648:

Support Forums, User Notes: Link moderator's username to the correct site.

See #2272.

#12 @SergeyBiryukov
7 years ago

In 5649:

Support Forums, User Notes: Rename "Toggle user notes" link to "User Notes", to prevent "Unflag Author" link from wrapping to a second line.

See #2272.

#13 @SergeyBiryukov
7 years ago

In 5650:

Support Forums, User Notes: Limit note editing and deletion:

  • Only keymasters or the note author can edit a note.
  • Only keymasters can delete a note.

See #2272.

#14 @SergeyBiryukov
7 years ago

In 5652:

Support Forums, User Notes: Make sure only keymasters can see notes on moderators.

See #2272.

#15 @netweb
7 years ago

If #WP20564's wp post meta revisions ever lands it would be good to switch to it ;)

My bad, Post Meta ! User Meta ;)

Last edited 7 years ago by netweb (previous) (diff)

#16 @SergeyBiryukov
7 years ago

In 5658:

Support Forums, User Notes: Add view=all to post link associated with a note.

See #2272.

#17 @SergeyBiryukov
7 years ago

In 5659:

Support Forums, User Notes: Cache notes output to a static variable, following the idea from the original patch, to avoid repeated template function calls.

See #2272.

#18 @SergeyBiryukov
7 years ago

In 5660:

Support Forums, User Notes: Make plain text URLs in notes clickable.

See #2272.

#19 @SergeyBiryukov
7 years ago

In 5669:

Support Forums, User Notes: Apply comment_text filters to user note text, including wpautop() and make_clickable().

Remove redundant wp_kses() call, as it already runs on saving.

See #2272.

#20 @SergeyBiryukov
7 years ago

In 5670:

Support Forums, User Notes: Make sure notes are only displayed for other users.

See #2272.

#21 @SergeyBiryukov
7 years ago

In 5671:

Support Forums, User Notes: Allow super admins to see notes on the current user.

See #2272.

#22 @SergeyBiryukov
7 years ago

In 5712:

Support Forums, User Notes: After [5659], make sure the dynamic elements of note adding/editing form (post ID and permalink) are still dynamic.

See #2272.

#23 @SergeyBiryukov
6 years ago

In 7200:

Support Forums, User Notes: Introduce .has-user-notes class to allow for custom styling.

See #2272.

Note: See TracTickets for help on using tickets.