Group name in viewtopic

Shows a users default group name under their post details in viewtopic

Requested by cdog in this topic.

#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php  
#
#-----[ FIND ]------------------------------------------
#
            if ($poster_id == ANONYMOUS)
            { 
#
#-----[ FIND ]------------------------------------------
#
                    'user_colour'        => $row['user_colour'], 
#
#-----[ AFTER, ADD ]------------------------------------------
#
                    'group_id'            => '',     
#
#-----[ FIND ]------------------------------------------
#

Not a duplicate here, there's an array for guests and an array for registered users

                    'user_colour'        => $row['user_colour'], 
#
#-----[ BEFORE, ADD ]------------------------------------------
#
                    'group_id'            => $row['group_id'],     
#
#-----[ FIND ]------------------------------------------
#
    for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) 
#
#-----[ BEFORE, ADD ]------------------------------------------
#

Make sure we don't display hidden groups

    // Get groups name on the board
    $sql = 'SELECT group_id, group_name, group_type
       FROM ' . GROUPS_TABLE . '
       WHERE group_type <> ' . GROUP_HIDDEN;
    $result = $db->sql_query($sql);
    while ($row = $db->sql_fetchrow($result))
    {
       $groups_name[$row['group_id']] = ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name'];
    }
    $db->sql_freeresult($result);
#
#-----[ FIND ]------------------------------------------
#
            'POSTER_AGE'            => $user_cache[$poster_id]['age'], 
#
#-----[ AFTER, ADD ]------------------------------------------
#
            'POSTER_GROUP'          => $groups_name[$user_cache[$poster_id]['group_id']],
#
#-----[ OPEN ]------------------------------------------
#
styles/prosilver/template/viewtopic_body.html
#
#-----[ FIND ]------------------------------------------
#
	 <!-- IF postrow.POSTER_FROM --><dd><strong>{L_LOCATION}:</strong> {postrow.POSTER_FROM}</dd><!-- ENDIF -->
#
#-----[ AFTER, ADD ]------------------------------------------
#
	<!-- IF postrow.POSTER_GROUP --><dd><strong>{L_GROUP}:</strong> {postrow.POSTER_GROUP}</dd><!-- ENDIF -->