WordPress.org

Ready to get started?Download WordPress

Forums

Author Avatars List
Sort Authors by BBPress Post Count (15 posts)

  1. MikeySpice
    Member
    Posted 1 year ago #

    Is it possible to sort avatars by BBPRESS post counts and show BBPRESS post counts instead of WP post counts?

    Example:

    [authoravatars avatar_size=78 order=BBPRESS_post_count page_size=40 user_link=bbpress_memberpage show_name=false show_BBPRESS_postcount=true]

    http://wordpress.org/extend/plugins/author-avatars/

  2. Paul Bearne
    Member
    Plugin Author

    Posted 1 year ago #

    I don't know but I will look into it

  3. MikeySpice
    Member
    Posted 1 year ago #

    thank you. this would be helpful. great plugin!

  4. Paul Bearne
    Member
    Plugin Author

    Posted 1 year ago #

    Hi

    I have stated to code this but having problem get teh conunt from BudyPress

    see this post http://buddypress.org/support/topic/getting-post-count-via-user-id/#post-149037

    Can you tell me where in Budypress this info is shown so i an have look at that code to see what is being called

    Paul

  5. MikeySpice
    Member
    Posted 1 year ago #

    Hi Paul,

    Thanks for working on this. Have you tried this?

    get_user_post_count(userid)

    http://bbpress.trac.wordpress.org/changeset/3632

    Best,

    Michael

  6. Paul Bearne
    Member
    Plugin Author

    Posted 1 year ago #

    The more I look into this the more I am issues

    Have a look at this page
    http://phpdoc.ftwr.co.uk/bbpress-plugin/bbPress/UserOptions/_bbp-includes---bbp-user-options.php.html#functionbbp_get_user_last_posted
    you can get

    bbp_user_topic_count
    bbp_user_reply_count
    bbp_user_post_count

    which do we need or should sum all of them?

    Paul

  7. Paul Bearne
    Member
    Plugin Author

    Posted 1 year ago #

    yes I am looking at the function in that change set

  8. MikeySpice
    Member
    Posted 1 year ago #

    Hi Paul,

    As I understand the bbp terminology, "topics" are new threads created by the author and "replies" are replies to threads started by other authors. "posts" are the sum of "topics" and "replies."

    As such, my recommendation is that you use bbp_user_post_count as that represents all the content created by the author and the purpose of this sort is to list authors from most to least prolific.

    Thanks.

    Michael

  9. Paul Bearne
    Member
    Plugin Author

    Posted 1 year ago #

    yes I am looking at the function in that change set

  10. Paul Bearne
    Member
    Plugin Author

    Posted 1 year ago #

    thanks that helps

  11. Paul Bearne
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Mikey

    I think I have got this right.

    Would you please do some testing for me?

    http://downloads.wordpress.org/plugin/author-avatars.zip

    this link will down the development version of the code can install it and see if does what you want.

    Many thanks

    Paul

  12. MikeySpice
    Member
    Posted 1 year ago #

    Thanks Paul! I'll give it a test drive and let you know. Any doc on how to invoke the new sort?

  13. Paul Bearne
    Member
    Plugin Author

    Posted 1 year ago #

    No

    use the MCE function and you will see the changes

    here is an example

    [show_avatar email=2 user_link=bp_memberpage show_name=true show_postcount=true show_biography=true show_BBPRESS_post_count=true]

    [authoravatars roles=administrator,editor user_link=authorpage order=bbpress_post_count,asc]

  14. MikeySpice
    Member
    Posted 1 year ago #

    Hi Paul,

    I tested the change with the authoravatars shortcode as follows:

    [authoravatars avatar_size=78 order=bbpress_post_count,dsc page_size=40 user_link=bbpress_memberpage show_name=false show_BBPRESS_post_count=true]

    I believe the sort is working but I can't tell for certain because I am unable to display the BBPRESS_post_count with each avatar. As you can see from the code above, i have included show_BBPRESS_post_count=true but no post counts are appearing when I mouseover the avatar.

    As you can see from the code, I am also using paging and have a page size set to 40 avatars. When I page forwards to page 2 and back again to page 1, the avatars on page 1 are all replaced with the grey man.

    Best,

    Michael

  15. Paul Bearne
    Member
    Plugin Author

    Posted 1 year ago #

    good spot I had missed a bit of code

    I have also set it so you can show the count on its own

    Please pull a new copy of the code and do quick test

    http://downloads.wordpress.org/plugin/author-avatars.zip
    Many thanks with your help on this

    Paul

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic