WordPress.org

Making WordPress.org

Opened 13 months ago

Last modified 2 months ago

#2214 new task

Forums: Automate Support badges

Reported by: SergeyBiryukov Owned by:
Milestone: Priority: normal
Component: Support Forums Keywords:
Cc:

Description

From August 18th Support Team Meeting Summary:

New Automated Badge Requirements

As we discussed last week, the Support Contributor and Support Team badges will be automated based on the following criteria:

Support Contributor = [x] replies. (tentatively 400 for the English forums)

Support Team = Moderator.

Today, this was approved by unanimous vote. The automation will begin once the bbPress 2 forum launches, and the tentative number of required replies will likely be adjusted per language forum as necessary. The Support Contributor badge will be permanent, like all other Contributor badges, while the Support Team badge can be removed by being demoted back to a standard forum member.

The forums are now on bbPress 2.x, so I guess it's time to look into this task.

Change History (6)

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


13 months ago

#2 @macmanx
13 months ago

Just clarifying that we later settled on 400 replies for the English forums, so that's no longer tentative: https://make.wordpress.org/support/handbook/contributing-to-the-wordpress-forums/volunteering-in-the-forums/

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


6 months ago

#4 follow-up: @danieltj
3 months ago

Is the source code for this open or closed source? Can a non-committer take a look at this (i.e. me)?

#5 in reply to: ↑ 4 @SergeyBiryukov
3 months ago

Replying to danieltj:

Is the source code for this open or closed source? Can a non-committer take a look at this (i.e. me)?

The two key components are both open-sourced:

However, neither of them is present in the Meta Environment yet, so it might be tricky to set up a local install. I'll document my experience of creating a local Support Forums install here:

  • Prerequisites:
  • Setup:
    • Add the following constants to wp-config.php:
      define('WPORGPATH', dirname(__FILE__) . '/wp-content/wporg/' );
      
      define('WPORG_SUPPORT_FORUMS_BLOGID', 1);
      define('WPORG_PLUGIN_DIRECTORY_BLOGID', 1);
      define('WPORG_THEME_DIRECTORY_BLOGID', 1);
      
    • Copy the downloaded header.php and footer.php files to WPORGPATH directory.
    • Install WP with http://wporg.dev/support as home URL (or create a new site on a Multisite network).
    • Activate bbPress.
    • Activate the support-forums plugin and other wporg-bbp-* plugins, if needed.
    • Switch to the wporg-support theme.
    • In Reading Settings, select a static page as a front page
    • Open the front page for editing and set bbPress - Support (Index) as page template.
    • Create a few test forums, topics, and replies.

That should be it for getting the Support Forums up and running locally.

I think a solution for this ticket would look like this:

  • In wporg-profiles-association-handler, create a handler for the forums. There are two existing handlers that could be used as an example: handle_wordcamp_association() and handle_polyglots_association().
  • When creating a new reply (on bbp_new_reply action), check if the user has more than 400 replies in total, and submit a request to the association handler created on the previous step.
  • Store the result in user meta to avoid further requests to the handler.

I haven't worked with the wporg-profiles-association-handler plugin yet, but feel free to ask any questions, and we'll figure it out together :)

Last edited 3 months ago by SergeyBiryukov (previous) (diff)

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


2 months ago

Note: See TracTickets for help on using tickets.