If you want it as a php block (so no code edit's) and it won't get overwritten next time you update it's below.
global $txt, $scripturl;
$whos = tpo_whosOnline();
echo '<div>' . $whos['num_users_online'] .' ' , $whos['num_users_online'] == 1 ? $txt['user'] : $txt['users'] , '</div>';
if(isset($whos['users_online']) && count($whos['users_online']) > 0) {
$ids = array();
$names = array();
$times = array();
foreach($whos['users_online'] as $w => $wh) {
// For reasons historical, SMF produces the timestamp as
// the timestamp followed by the user's name, so let's fix it.
$timestamp = (int) strtr($w, array($wh['username'] => ''));
$ids[] = $wh['id'];
$names[$wh['id']] = $wh['name'];
$times[$wh['id']] = timeformat($timestamp);
}
$avy = progetAvatars($ids);
foreach($avy as $a => $av) {
echo '<a class="tp_avatar_single2" title="'.$names[$a].'" href="' . $scripturl . '?action=profile;u='.$a.'">' . $av . '</a>';
}
}