Ok, this is a good one. Has been talked about before, back in the previous dungeon. Bloc and I kicked it around a bit but it hasn't been implemented yet. I think it's time it was done.
Advantages are fewer http requests, and the icons can be changed in either the images folder (by overwriting in the usual way) or in the CSS. The latter opens up the option of having custom board icons without any back end hacking. All you need to do is write a litte bit of CSS and it'll work.
Example code for the basic conditonal would be like this:
foreach ($category['boards'] as $board)
{
echo '
<li class="board_row ', (!empty($board['children'])) ? 'parent_board':'', '" id="board_', $board['id'], '">
<div class="board_info">
<a';
// If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
echo '
class="icon_anchor board_new_posts" title="', $txt['new_posts'], '"';
// Is it a redirection board?
elseif ($board['is_redirect'])
echo '
class="icon_anchor board_redirect" title="', $txt['redirect'], '"';
// No new posts at all! The agony!!
else
echo '
class="icon_anchor board_no_posts" title="', $txt['old_posts'], '" />';
echo '
href="', ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '"></a>
CSS would just use a basic sprite, with either x or y positioning according to .icon_anchor.board_new_posts, etc.
To call custom board icons for each board, you'd just do something like this:
#board_3 .icon_anchor.board_new_posts {stuff here}
Obviosuly, being CSS stuffz, these would also work without any images at all. You could use icon fonts, or utf8 entities, or whatever.