Skip to:
Content

bbPress.org

Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#2645 closed defect (bug) (fixed)

Add support to approve and unapprove pending topics and replies

Reported by: netweb's profile netweb Owned by: johnjamesjacoby's profile johnjamesjacoby
Milestone: 2.6 Priority: normal
Severity: normal Version:
Component: API - Moderation Keywords: has-patch commit
Cc:

Description

Add support to approve and unapprove pending topics and replies


Related:

  • #459 Consider making moderation forum specific
  • #2546 bbpress skips check for number of links if blacklist is empty
  • #2589 Pending Moderation template notice
  • #2593 Allow Moderators and Keymasters to see private topic content from users
  • #2644 Add editable reply-status dropdown in form-reply.php for moderators when editing replies

Attachments (6)

2645.diff (42.0 KB) - added by netweb 11 years ago.
2645.2.diff (38.5 KB) - added by netweb 11 years ago.
2645.3.diff (45.0 KB) - added by netweb 11 years ago.
2645.4.diff (9.5 KB) - added by thebrandonallen 10 years ago.
2645.5.diff (2.2 KB) - added by netweb 10 years ago.
2645.6.diff (12.7 KB) - added by netweb 10 years ago.

Download all attachments as: .zip

Change History (34)

@netweb
11 years ago

#1 @netweb
11 years ago

  • Keywords dev-feedback 2nd-opinion added

In 2645.diff first pass:

  • Add Approve/Unapprove topic and reply toggles in the backend
  • Add Approve/Unapprove topic and reply admin links in the frontend
  • Show the 'approve' and 'view' link on pending posts only and 'unapprove' on published posts only
  • Add .status-pending CSS background-color: #fef7f1; for 'pending' topics/replies (via WP Core)
  • Add bbp_approve_reply()/bbp_unapprove_reply() functions
  • Add bbp_approve_topic()/bbp_unapprove_topic() functions
  • Add bbp_is_reply_pending()/bbp_is_topic_pending()` helper functions
  • Add bbp_is_reply_private()/bbp_is_topic_private()` helper functions
  • Add bbp_reply_approve_link()/bbp_topic_approve_link() functions

  • Remove $success = wp_update_post( $post_data ); from reply admin toggle_reply()
    • There is no post data to update here, it is updated using bbp_unspam_reply()/bbp_spam_reply() and bbp_approve_reply()/bbp_unapprove_reply() functions.
    • In toggle_topic() does not fire wp_update_post() after topiic actions

ToDo:

  • Topic and reply status around bbp_check_for_moderation() and bbp_check_for_blacklist()
  • bbp_get_reply_statuses bbp_get_topic_statuses
  • Update published/pending verbiage topic status via bbp_get_form_topic_status_dropdown() in frontend and backend
  • Update published/pending verbiage reply status via bbp_get_form_reply_status_dropdown() in frontend and backend
  • Include 'pending' topics in bbp_get_forum_topic_count_hidden()
  • Include 'pending' replies in bbp_get_topic_reply_count_hidden()
  • After approving a topic or reply it should be spam checked
  • Probably Spam/Trashed topics and replies should not have approve/unapprove links
Version 1, edited 11 years ago by netweb (previous) (next) (diff)

This ticket was mentioned in IRC in #bbpress-dev by netweb. View the logs.


11 years ago

This ticket was mentioned in IRC in #bbpress-dev by netweb. View the logs.


11 years ago

@netweb
11 years ago

#4 @netweb
11 years ago

Latest 2645.2.diff​ patch is a refresh only of 2645.diff​ to apply cleanly against trunk.

@netweb
11 years ago

#5 @netweb
11 years ago

Patch 2645.3.diff​ adds 'pending' support to topic/reply 'hidden' counts and some minor iterations on previous patch:

  • Include 'pending' topics in bbp_get_forum_topic_count_hidden() Added in 2645.3.diff
  • Include 'pending' replies in bbp_get_topic_reply_count_hidden() Added in 2645.3.diff

#6 @johnjamesjacoby
10 years ago

  • Keywords needs-refresh added; dev-feedback 2nd-opinion removed

Patch no longer applies clean, sadly. Mind refreshing this? It's a huge effort, and would be nice to get into 2.6 since it's already patched.

#7 @johnjamesjacoby
10 years ago

In 5500:

Clean up core actions.php. Props netweb. See #2645.

#8 @johnjamesjacoby
10 years ago

In 5501:

Update phpdoc blocks in forum template functions. Props netweb. See #2645.

#9 @johnjamesjacoby
10 years ago

In 5502:

Add pending topics to forum hidden topic counts. Props netweb. See #2645.

#10 @johnjamesjacoby
10 years ago

In 5503:

Preliminary function support for un/approving topics. Props netweb. See #2645.

#11 @johnjamesjacoby
10 years ago

In 5504:

Preliminary template support for un/approving topics. Props netweb. See #2645.

#12 @johnjamesjacoby
10 years ago

In 5505:

Add pending status to search results for capable users wishing to view all results. Props netweb. See #2645.

#13 @johnjamesjacoby
10 years ago

In 5506:

Preliminary function support for un/approving replies. Props netweb. See #2645.

#14 @johnjamesjacoby
10 years ago

In 5507:

Preliminary template support for un/approving replies. Props netweb. See #2645.

#15 @johnjamesjacoby
10 years ago

In 5508:

Add default theme compat styling for pending topics and replies. Props netweb. See #2645.

#16 @johnjamesjacoby
10 years ago

In 5509:

Administrative support for un/approving replies. Props netweb. See #2645.

#17 @johnjamesjacoby
10 years ago

All that's left is admin/topics.php I believe, needing manual patch-merging to work around conflicts introduced in r5496.

This ticket was mentioned in IRC in #bbpress-dev by netweb. View the logs.


10 years ago

#19 follow-up: @thebrandonallen
10 years ago

  • Keywords has-patch added; needs-refresh removed

This should finish the ticket. Attached is a clean patch for admin/topics.php.

#20 @netweb
10 years ago

In 5515:

PHPDdoc corrections for topic and reply pending status approve and unapprove functions. See #2645

@netweb
10 years ago

#21 in reply to: ↑ 19 @netweb
10 years ago

  • Keywords commit added

Replying to thebrandonallen:

This should finish the ticket. Attached is a clean patch for admin/topics.php.

Thanks, 2645.4.diff​ is good, just needs committing by @jjj for sanity ;)

One last thing and I think we can resolve this as fixed, in 2645.5.diff​ we need to update, the topic bbp_single_topic_description() and forum bbp_get_single_forum_description() when a topic or reply is approved or unapproved with the topic walker bbp_update_topic_walker or reply walker bbp_update_reply_walker.

#22 @netweb
10 years ago

In 5540:

Drupal7: Add support for importing Drupal v7.x pending topics and replies. See #2645

This ticket was mentioned in Slack in #bbpress by netweb. View the logs.


10 years ago

@netweb
10 years ago

#24 @netweb
10 years ago

Updated patch 2645.6.diff replaces 2645.4.diff and 2645.5.diff and also add's spam row action for replies with pending status.

This ticket was mentioned in Slack in #bbpress by netweb. View the logs.


10 years ago

#26 @johnjamesjacoby
10 years ago

  • Owner set to johnjamesjacoby
  • Resolution set to fixed
  • Status changed from new to closed

In 5583:

Administrative support for for un/approving topics.

Props netweb, thebrandonallen. Fixes #2645.

#27 @johnjamesjacoby
10 years ago

This initiative now appears complete. Reopen if necessary, otherwise please create new tickets for individual bugs, enhancements, or tasks, even if related.

Thank you everyone. This is hugely excellent.

#28 @netweb
10 years ago

#2473 was marked as a duplicate

Note: See TracTickets for help on using tickets.