Forums

[Plugin: Author Avatars List] BuddyPress integration (13 posts)

  1. ndrwld
    Member
    Posted 5 months ago #

    Really nice plugin! Maybe you think about adding integration with Buddypress avatars? Now it show only gravatars.
    I think combination with BP and this plugin options would be awesome.
    Matew

  2. bforchhammer
    Member
    Posted 5 months ago #

    Thanks. BuddyPress-Integration has been on our radar but I haven't looked at the specifics yet.

    From a quick look at the code I think it should actually work with buddypress' uploaded avatars as well; there is this bit of code in "bp-core/bp-core-avatars.php" that should override default avatars if you're using the buddypress versions...
    add_filter( 'get_avatar', 'bp_core_get_avatar_filter', 10, 4 );

    (If someone has a test install of buddypress for me to play with that would help ;-))

  3. bforchhammer
    Member
    Posted 5 months ago #

    Okay, step 1 done: BuddyPress does not like get_avatar calls with the "email address" passed to it, so I've changed my code to use the user_id instead... (Changeset 118704)

  4. ndrwld
    Member
    Posted 5 months ago #

    Big thanks bforchhammer plugin now displays the avatars.
    But I've the problem with linking avatars to author page option. In this option plugin creates links to Authors of main blog - http://domain.test/blog/author/admin/, the link structure should be - http://domain.test/members/admin/ -
    /blog/ and /members/ are BuddyPress Slugs - here is /developers/ slug example
    I think the best solution would be to add one more option - "BP member page"

  5. bforchhammer
    Member
    Posted 5 months ago #

    Here you go: Changeset 118924

    I just stumbled over the buddypress members loop... doesn't have a widget (yet) but might be more suited in some use cases than my plugin.

  6. ndrwld
    Member
    Posted 5 months ago #

    Big thanks for changes and link. Link to BP members page works perfect.
    Right now for my purposes, there are pretty enough options. It can be also used by other users to display users of their blog.
    I really like it!
    Thanks once more.

  7. bforchhammer
    Member
    Posted 5 months ago #

    Thanks for testing and feedback. I think I'm going to release these changes as a new version later today...

  8. bforchhammer
    Member
    Posted 5 months ago #

    Now in trunk: sorting by recent activity (See changes 120577)

  9. TheBlogHouse
    Member
    Posted 4 months ago #

    Hi

    Did you ever get this plugin displaying a BuddyPress user's uploded avatar?

    I can get this plugin showing the author of the post's Gravatar image but it doesn't seem to show their custom BuddyPress avatar?

    The code I am using is the following:

    <?php echo get_avatar(get_the_author_email()); ?>

    Cheers in advance for any help!

  10. bforchhammer
    Member
    Posted 4 months ago #

    Buddypress get_avatar function does not work with the email address... you have to use the user-id or username (I think) instead:

    <?php echo get_avatar(the_author_meta('ID')); ?>

  11. TheBlogHouse
    Member
    Posted 4 months ago #

    Thanks for the quick reply :)

    I have actually sorted this myself after having another good look around the BuddyPress core files and the following placed withing the post loop does exactly what I need:

    <?php
      bp_post_author_avatar()
    ?>
  12. tsalagi_red
    Member
    Posted 3 months ago #

    I can't seem to get the avatar size to change. It remains small, no matter what size I set it to. I'm using the widget with Buddypress.

  13. bforchhammer
    Member
    Posted 3 months ago #

    Hm, could you provide a link to an example or an excerpt of the source code that gets created by the plugin?

Reply

You must log in to post.

About this Topic