Quick way to show blog avatars on Site Categories Directory Page

Wasn't sure where to put this but there's more than one post (albeit a little old) asking about showing the blog avatars in the WPMU Site Categories Plugin. I needed this functionality as well and just made a quick mod to one file and thought I'd share it here. Of course this is just a quick and dirty way to get this done ans would be wiped out by an update. Maybe someone with more time than me will incorporate this into something :wink:

So, you'll need to modify

/site-categories/lib/display_templates/display_list_category_sites.php

Depending on version, you'll want to look at around line 36ish for this:

if ($args['open_blank'] == '1') { $link_target = ' target="_blank" '; }
				else { $link_target = ''; }
				$content .=	'<a href="'. $site->siteurl .'" '. $link_target .' class="site-category-site-url">'. $image_src
	'<span class="site-category-site-title">'. $site->blogname .'</span></a>';

and you'll want to change to this:

if ($args['open_blank'] == '1') { $link_target = ' target="_blank" '; }
else { $link_target = ''; }
$args2 = array( 'item_id' => $site->blog_id, 'object' => 'blog', 'class' => 'blog-avatar');
$result = bp_core_fetch_avatar($args2);
$content .=	'<a href="'. $site->siteurl .'" '. $link_target .' class="site-category-site-url">'. $image_src
	.$result.'<span class="site-category-site-title">'. $site->blogname .'</span></a>';

Basically just pulling in the avatar HTML via bp_core_fetch_avatar() function and sticking it in $result var and then adding to the string.

Hope that helps someone.

RJB