You should be able to take this part of the code:
PHP Code:
$groupid = 43;
$users = $vbulletin->db->query_read("SELECT username FROM ".TABLE_PREFIX."user
WHERE usergroupid = $groupid OR FIND_IN_SET($groupid, membergroupids)";
$str = '';
$sep = '';
while ($user = $vbulletin->db->fetch_array($users))
{
$str .= $sep . $user['username'];
$sep = ', ';
}
// $str is comma separated list of users in $groupid
$vbulletin->db->free_result($users);
and put it where the tutorial says "// ###### YOUR CUSTOM CODE GOES HERE #####". Then instead of using echo, you'd probably want to register $str as a variable in your template like:
HTML Code:
$templater->register('str', $str);
(you can see where these go in the example code), and then use it in a tag in the template like {vb:raw str}.