Skip to:
Content
Pages
Categories
Search
Top
Bottom

Adding Post Count / Etc. to BBPress Plugin


  • neodoxa
    Participant

    @neodoxa

    Is there a way to add total post count and roles (moderator, etc.) under the avatars/usernames of users in the forum?

    I’m using the BBPress plugin with a Buddypress / WordPress site.

    Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Not at the moment but post counts will probably make an appearance in 2.2.

    I’m making a post count plugin for bbpress 2.1, but the problem is that I’m new to PHP/MySQL, WordPress, and bbPress. From what I understand, I need to add a row called ‘post count’ to the usermeta table and hook the ‘bbp_theme_after_reply_form_submit_button’ action hook with a function that increases ‘post count’ by 1. I believe I must assign this newly hooked action a low priority as well so that the increase only comes after the post gets submitted into the database.

    I should also add a function that builds all post counts for first time run, and even leave a button possibly called “rebuild post count” in the dashboard to run the function. Preferably, I’d like to add a feature where it can run itself every now and then to ensure things the posts are accurate.

    I can count up everyone’s post count by filtering through the ‘posts’ table. All replies and topics are labeled as ‘reply’ and ‘topic’ in the post_type column, and there is a post_author column as well. Given these two columns, writing this function should be very simple. But I’m new to PHP/MySQL, and only a computer science student… So even this is a bit of work for me :(

    Additionally, I can add another row so we can add artificial post count increase or decrease as well. Another row is needed because we don’t want the build/rebuild post count function mentioned above overwriting any increase or decrease an admin wants to have in effect. I personally need this row because I’m moving a 2yr old community off of IPB.

    bbPress is going to handle all of this fully in core soon (likely in 2.2).

    Check out https://bbpress.trac.wordpress.org/ticket/1694 for more details.

    Ah I see, thank you for the link. I guess I’ll keep any work I do to myself then, it’s a learning experience for me. Too bad it got punted to 2.2 though, I’m already feeling really excited and impatient for 2.1 hehe

    I hear you. I often forget that everyone else isn’t using 2.1. It will be out soon though and then we will start work on 2.2 :)

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Skip to toolbar