Skip to:
Content
Pages
Categories
Search
Top
Bottom

User Photo avatar displayed on forum home?

  • http://bbpress.org/plugins/topic/user-photo-for-bbpress/

    Hi, I’m trying to display the avatar of the person who started the forum topic on the mainpage, in the place of the last posters name, in the latest discussions area.

    I’ve tried using the way it displays in profiles

    <?php if ( $avatar = bb_get_avatar( $member->ID ) ) : ?>

    <div id=”useravatar”><?php echo $avatar; ?></div>

    <?php unset($avatar); endif; ?>

    It does not work. I’ve tried pulling it like in a post

    <?php post_author_avatar_link(); ?>

    Nothing. One more

    <?php

    if (function_exists(‘bb_get_photo’))

    bb_get_photo($user->ID);

    ?>

    No joy there either. I tried using this function

    <img src=”<?php echo USERPHOTO_URL . $profileuser->userphoto_image_file . “?” . rand() ?>” alt=”<?php _e(“Full size image”, ‘user-photo’); ?>” />

    and it almost does it…

    http://localhost.wordpress.com/wp-content/uploads/userphoto/?29089

    but as you can see it does not grab the users avatar, (1.jpg) although it’s pointing to the right place.

    has anyone ever gotten avatars showing on the mainpage with the user photo plugin? I am aware other plugins exist for avatars but they do not suit my needs, apart from this one hickup, user photo is the best for wordpress/bbpress shared avatars. The guy who made it has long since left :(

Viewing 3 replies - 1 through 3 (of 3 total)
  • Okay based on my question, this might work

    <?php
    if (function_exists('bb_get_photo'))
    bb_get_photo($topic->topic_last_poster);
    ?>

    try it?

    No good :(

    but… from your other related thread…

    <?php echo bb_get_avatar( $topic->topic_last_poster, ’16’);?>

    works bro! I owe you a few beers, thankyou!


    chrishajer
    Participant

    @chrishajer

    Yes, don’t forget to echo the output returned by the function.

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