Skip to:
Content
Pages
Categories
Search
Top
Bottom

post count ?


  • rsix08
    Participant

    @rsix08

    Is it possible to show a post count under the user for bbpress? I’ve done some searching but still haven’t been able to find a proper way to do it

Viewing 23 replies - 1 through 23 (of 23 total)

  • Robin W
    Moderator

    @robin-w

    “under the user” where do you mean?
    You’ll see topic and reply counts when you display the user’s profile.

    please post a link to a page where you want it displayed


    rsix08
    Participant

    @rsix08

    hi, here is a link
    http://www.crossfit1066.com/forums/topic/testtes-2/

    wondering if it is possible to display current post count under the author’s avatar


    Robin W
    Moderator

    @robin-w

    ok, so you’ll need to edit

    web/wp-content/plugins/bbpress/templates/default/bbpress/loop-single-reply.php

    line 45 shows the avatar, so try adding a line 46

    <?php echo bbp_get_user_post_count( $user_id ); ?>

    haven’t tried it !


    rsix08
    Participant

    @rsix08

    hey thank’s a lot for your help. I’ve added the code but it doesn’t look like it worked.

    this is the file I had to modify

    /wordpress/wp-content/plugins/bbpress/templates/default/bbpress/loop-single-reply.php


    Robin W
    Moderator

    @robin-w

    ok, when I get a mo, I’ll try it on my test site


    Robin W
    Moderator

    @robin-w

    Ok, I’ve had a play and sorted out what was wrong

    I’ve now wrapped this up in a plugin, so that you won’t lose it on upgrades.

    This plugin shows

    topics started
    replies written
    total posts

    under the avatar of each post

    The plugin file is very easy, and you can edit it to remove lines or change the wording

    you can download it from

    bbp topic count plugin


    rsix08
    Participant

    @rsix08

    Hi thanks a bunch Robin.
    I have added the plugin but it is showing everything as 0
    my user has 1 topic and 2 replys

    Topics Started : 0

    Replies written : 0

    Total posts : 0


    Robin W
    Moderator

    @robin-w

    If you click the avatar, you should go through to the profile page for that user, where bbpress shows the topic and reply count – can you tell me if those are also 0?

    This will tell me whether it is a bbpress or my plugin issue


    rsix08
    Participant

    @rsix08

    I think it displays ok in the profile, is this the spot to check, the forums tab? pasted below

    Forum Topics Started
    Viewing topic 1 (of 1 total)

    Topic
    Voices
    Posts
    Freshness
    testtes

    Started by: Avatar of CrossFit1066 Admin CrossFit1066 Admin in: Ask Neil and Perks
    1
    3
    13 minutes ago


    Robin W
    Moderator

    @robin-w

    no, simply click the avatar – for instance since this support forum is bbpress,. just click the picture of pigs to the left of this post – you’ll see my topic count.

    Do this for your website, an dit should show the posts for whichever user is in the avatar


    rsix08
    Participant

    @rsix08

    It displays a bit different, can you have a look
    my page is http://www.crossfit1066.com/forums/ password is britfit


    Robin W
    Moderator

    @robin-w

    Don’t post passwords on forums !! edit and delete the one above from the post above or you’ll be hacked very quickly, and then change the password for the site


    Robin W
    Moderator

    @robin-w

    Sorry wasn’t yelling – have now seen that this is a password protected page rather than a wordpress password

    will take a look


    rsix08
    Participant

    @rsix08

    yes no worries , yes it is just an access password I am going to remove it once the site is live. thanks for your help


    Robin W
    Moderator

    @robin-w

    ok, interesting

    do you have phpmyadmin access to the database?


    rsix08
    Participant

    @rsix08

    hi, yes i do


    Robin W
    Moderator

    @robin-w

    great

    Can you go into te users table and note the ID of your crissfit admin

    Then in the usermeta for that ID, can you see if you have parameters for _bbp_topic_count and _bbp_reply_count, the line items may be preceded by wp_ eg wp__bbp_topic_count

    if so let me know what values are set.

    I’m trying to figure out if my plugin is correctly referencing the database, but the database is incorrect, or if I have a parameter wrong. It works on my site.


    rsix08
    Participant

    @rsix08

    the id is 1 but i’m not sure how to get the other information.
    i don’t see any of those values in the wp_usermeta table


    Robin W
    Moderator

    @robin-w

    ok, you would easily see it in usermeta table if it was there.

    would suggest that is why it is coming up a 0

    can you try

    Dashboard>tolls>forums
    and then the tab ‘repair forums’

    and then click “count topics for each user” and “count replies for each user”

    and see if that fixes it

    what versions of wordpress and bbpress are you on
    do you have buddypress also installed?


    rsix08
    Participant

    @rsix08

    it looks like it fixed it, but i’ve added a few more replies and the counters have stayed the same
    yes i’m using bbpress, buddy press, i have also installed buddypress achievements all latest versions


    Robin W
    Moderator

    @robin-w

    Hmmm…not sure where to go next.

    The counting function is in

    includes/users/options.php

    that it is an option makes me think that it is switchable, but no idea where it would be turned off and on, or indeed why !

    If you’ve not got your main site on buddypress, might be worth deactivating it to see if that fixes it.

    Otherwise you could post on the buddypress support site

    Please come back if you get any further !


    rsix08
    Participant

    @rsix08

    Appreciate all the help
    I have tried disabling the buddypress and acheivements I wish they would integrate it in the plugin.


    Robin W
    Moderator

    @robin-w

    OK, all I can suggest is that you try

    A re-install bbpress – it is possible it didn’t all download correctly and/or
    Changing to a default theme (such as twentytwelve) to see if that fixes, if so, then contact your theme provider

    After that I’m out of ideas I’m afraid !

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