Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to definitively display Buddypress avatars in BBPress???

  • Avatar of tinabeans
    tinabeans
    Member

    @tinabeans

    I know there have been a million and one posts/questions about this. The trouble is, there is a lot of conflicting instructions… and it is scattered all over the place. I feel like I am very close, but cannot for the life of me get this to work…

    So far, I’ve successfully done the WordPress “deep integration.” I tested this by putting some random Buddypress tags in BBpress template files. They worked fine. Here’s where I’m running into some trouble:

    I am trying to display the exact same avatar that appears in Buddypress for a particular user in BBPress as well. I tested the following template tags on my profile.php (in my BBpress theme):

    bp_member_avatar(); no result (blank)
    bp_core_fetch_avatar(userid); -> no result (blank)
    bp_core_get_avatar(userid); -> function undefined
    get_avatar(userid); -> this shows the wordpress avatar, not the buddypress one

    Help. Which is the correct tag to use? I need to be able to display an avatar based on user id. That is all. Surely that’s not impossible?

    If there are no existing tags that will do this, can someone just tell me how to do a database query? I found this post http://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/where-are-the-avatars/ but don’t know where to go from there…

    Thanks in advance!

    Running: WP MU 2.9.2, Buddypress 1.2.3, and BBPress 1.0.2

Viewing 4 replies - 26 through 29 (of 29 total)
  • Hello,

    i am writing my own plugin which needs avatars from BuddyPress. Plugin is pulling members IDs and some other info they’ve putted in their profiles from the database, but can’t figure out how to echo avatar based on the user’s ID. Any help with this?

    Thanks

    Ok, i’ve managed to do it with:
    global $bp;
    bp_core_fetch_avatar( array( ‘item_id’ => $id, ‘type’ => ‘full’, ‘width’ => ’75′, ‘height’ => ’75′, ‘html’ => ‘false’ ) )

    If somebody needs the same thing he can try this lines, maybe it will help. :)

    Avatar of chicoi
    chicoi
    Participant

    @chicoi

    hm… Thanks ray for the code.. I have used the one that is placed on the functions.php.

    But i have a little problem.. When i resized the image.. it is pixelated.. when i inspect the element.. It is fetching the bpthumb..
    I also want to change the Avatar in the profile.php using the same avatar as the buddypress too…
    Can anyone help me fix this please? thanks a lot!

    Avatar of julesmoretti
    julesmoretti
    Member

    @julesmoretti

    @r-a-y

    Love your script for bbpress. It worked great for the post authors, but does not seem to work so well for the topic author, would you know why by any chance?

    The current code line for the topic author avatar is as such:
    topic_poster), 48, ‘identicon’ ); ?>

    You can check out the site at gradiduncut.com

    And everything under the avatar admin setting is set to on.

    Thank you for your help, so far its been a huge help.

    Best

Viewing 4 replies - 26 through 29 (of 29 total)

You must be logged in to reply to this topic.