Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: How to get a user's last update?


m@rk
Participant

@mrk-1

Hi andrewsa,

you have to give a valid $user_id at least. I’m using this in my blog’s sidebar, have a look at http://spaces.nordblog.net/mark/ in the upper right corner.

I defined in blog theme’s functions.php:

function bp_author_info( $title, $user_id){

// Fetch some ...
// Get author's data BuddyPress style:
$author = new BP_Core_User( $user_id);

// Make output ...
echo "<!-- Status Updates -->
<h2>{$title}</h2>
<ul><li>
<span class=\"alignleft\">
<a href=\"{$author->user_url}\" title=\"Profil von {$author->fullname}\">{$author->avatar_thumb}</a>
</span>\n";
bp_activity_latest_update( $user_id); // contains echo with View link
echo "<span style=\"display: block; clear: both;\"><!-- clear --></span>
</li></ul>\\n";

}

… and inserted in sidebar.php:

if( function_exists( 'bp_author_info')){
bp_author_info( $title = "Mensch", $userid = 2 );
}

Skip to toolbar