just a general theory
what about hooking on the action “bp_directory_members_item” in members-loop template
then within that hooked function – call “bp_blogs_get_blogs” (see bp-blogs.php line 279) which accepts a few arg params (user_id, per_page,page – but set those to so you do not paginate) Use the templatetag bp_get_member_user_id() for the user_id
“bp_blogs_get_blogs” will return an array( ‘blogs’ => $paged_blogs, ‘total’ => $total_blogs ) – $paged_blogs is the direct result from the mysql query though. Have a look at bp-blogs-classes.php and the ::get function for the column names (domain, path, name, description). You may need to reference bp-blogs-templatetags.php as the blog_permalink is built depending on if the domain is empty
though the only drawback is for each user in the member-loop – this will perform a bunch of extra queries just to find the blog info.
rich-
a theory is much better than what I had… crap.
I figured I’d have to hook into something but didn’t know in what order to do things. I’ll try it out later sometime and report back.
Thanks,
~Kyle~
Yeah, I was hesitant to suggest that without some thought as it’s going to be quite database heavy (even though the BuddyPress blogs table does aggregate this information for you).
So, I read through all of this and tried to piece it together. I get the theory but I can’t write it to make it work.
I’m trying but I’m not really getting anywhere. If you’ve got a spare second, I’d love to see an example and dissect some of your code.
Thanks,
~Kyle~
ok, if you can wait until the weekend ( some non-computer priority stuff right now ) – i’ll give it a go at coding up a solution