*CAUTION*
This snippet runs quite an expensive query in viewtopic. I haven't looked into trimming it down, so you may want to try and find a way reduce the load caused by this before installing. If anyone finds a less expensive query, please post it here and I will update this article. Full credit will be given
Comment:
#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
#
#-----[ BEFORE, ADD ]------------------------------------------
#
#
#-----[ FIND ]------------------------------------------
#
#
#-----[ BEFORE, ADD ]------------------------------------------
#
#
#-----[ OPEN ]------------------------------------------
#
styles/prosilver/template/viewtopic_body.html
#
#-----[ FIND ]------------------------------------------
#
#
#-----[ AFTER, ADD ]------------------------------------------
#
#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
- Code: Select all
//
$postrow = array(
#
#-----[ BEFORE, ADD ]------------------------------------------
#
- Code: Select all
// Stolen from memberlist.php - get a dropdown list of all users groups (checking for auths as well)
$gsql = 'SELECT g.group_id, g.group_name, g.group_type
FROM ' . GROUPS_TABLE . ' g, ' . USER_GROUP_TABLE . " ug
WHERE ug.user_id = $poster_id
AND g.group_id = ug.group_id" . ((!$auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) ? ' AND g.group_type <> ' . GROUP_HIDDEN : '') . '
AND ug.user_pending = 0
ORDER BY g.group_type, g.group_name';
$res = $db->sql_query($gsql);
$group_list = array();
while ($grow = $db->sql_fetchrow($res))
{
$group_list[] = ($grow['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $grow['group_name']] : $grow['group_name'];
}
$db->sql_freeresult($res);
$group_list = implode(', ', $group_list);
#
#-----[ FIND ]------------------------------------------
#
- Code: Select all
'S_IGNORE_POST' => ($row['hide_post']) ? true : false,
#
#-----[ BEFORE, ADD ]------------------------------------------
#
- Code: Select all
'S_GROUP_LIST' => $group_list,
#
#-----[ OPEN ]------------------------------------------
#
styles/prosilver/template/viewtopic_body.html
#
#-----[ FIND ]------------------------------------------
#
- Code: Select all
<!-- IF postrow.POSTER_FROM --><dd><strong>{L_LOCATION}:</strong> {postrow.POSTER_FROM}</dd><!-- ENDIF -->
#
#-----[ AFTER, ADD ]------------------------------------------
#
- Code: Select all
<!-- IF postrow.S_GROUP_LIST --><dd><strong>{L_GROUPS}:</strong> {postrow.S_GROUP_LIST}</dd><!-- ENDIF -->
Edit: nasadows has come up with a great addition to this snippet - his code will split each group on to a new line, link the group name to the groups page and add the groups color to the text 
It can be found here - http://www.phpbb.com/community/viewtopi ... #p11033705
A screenshot of the updated code is below
It can be found here - http://www.phpbb.com/community/viewtopi ... #p11033705
A screenshot of the updated code is below

