Possibly the most easy way is to edit the core file and add such a stuff there.
bb_func_vthread.php - locate the code which looks like
there, you may add something to $viewReg=$l_anonymous;
definition. For example,
Another (non-destructive way) would be to install the Avatars add-on for members and then modify parseUserInfo_user_custom1
function from bb_plugins.php so it also generates the content for Guests.