I'm using Donncha's Sitewide Tags plugin to power a blog with posts from all blogs. I've been trying to figure out how to use the wpmu function get_blog_details to show the blogname for each post as directed by Donncha here. (Additionally, I would like to make a css class that would look like blog_5 to differentiate blogs.)
I've tried figuring out a way to dynamically pass a blog_id into get_blog_details, but I haven't figured out a way to do this. One thing I've tried to do is use post_blog_id from the plugin to generate the blog_id, but since I don't really know a lot of PHP, I might not be doing the right thing.
<?php get_blog_details( $post_blog_id ); ?>
I've also tried using
$details = get_active_blog_for_user(get_the_author_id());
echo '<a href="' . $details->siteurl . '">' . $details->blogname . '</a>';
suggested by dsader, but this doesn't work properly for me. It returns the default blog for a user, but this is often not the blog that the post is from because I have a large group blog that nearly all users post to.