Info
- 4 posts
- 3 voices
- Started 2 years ago by Damien
- Latest reply from chrishajer
- This topic is resolved
User Photo avatar displayed on forum home?
-
- Posted 2 years ago #
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/?29089but 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 :(
-
- Posted 2 years ago #
Okay based on my question, this might work
<?php if (function_exists('bb_get_photo')) bb_get_photo($topic->topic_last_poster); ?>try it?
-
- Posted 2 years ago #
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!
-
- Posted 2 years ago #
Yes, don't forget to echo the output returned by the function.
-
This topic is
closed