1
With this hack you'll see the owner user groups for each post.
A little screenshot:

Instructions:
Download the hack
here , or apply it manually.
For appling manually:
1º Open modules/newbb/viewtopic.php
Add this after line "include 'header.php';"
//----------------------hack show groups by samuels-------------------------------------------------------------
function GetGroupsNames ($uid)
{
$member_handler =& xoops_gethandler('member');
$User= new XoopsUser($uid);
$user_groups=$User->getGroups();
$count = count($user_groups);
//$groups =& $member_handler->getGroups();
for ($i=0;$i<$count;$i++)
{
$thisgroup =& $member_handler->getGroup($user_groups[$i]);
$g.=$thisgroup->getVar('name')."
";
}
return ($g);
}
//----------------------end hack show groups by samuels---------------------------------------------------------
In the same file viewtopic.php look for the line
$posterarr = array('poster_uid' => $eachposter->getVar('uid'), 'poster_uname' => '.XOOPS_URL.'/userinfo.php?uid='.$eachposter->getVar('uid').'">'.$eachposter->getVar('uname').'', 'poster_avatar' => $eachposter->getVar('user_avatar'), 'poster_from' => $eachposter->getVar('user_from'), 'poster_regdate' => formatTimestamp($eachposter->getVar('user_regdate'), 's'), 'poster_postnum' => $eachposter->getVar('posts'), 'poster_sendpmtext' => sprintf(_SENDPMTO,$eachposter->getVar('uname')), 'poster_rank_title' => $poster_rank['title'], 'poster_rank_image' => $poster_rank['image'], 'poster_status' => $poster_status);
And change for:
//----------------------hack show groups by samuels-------------------------------------------------------------
//$posterarr = array('poster_uid' => $eachposter->getVar('uid'), 'poster_uname' => 'getVar('uid').'">'.$eachposter->getVar('uname').'', 'poster_avatar' => $eachposter->getVar('user_avatar'), 'poster_from' => $eachposter->getVar('user_from'), 'poster_regdate' => formatTimestamp($eachposter->getVar('user_regdate'), 's'), 'poster_postnum' => $eachposter->getVar('posts'), 'poster_sendpmtext' => sprintf(_SENDPMTO,$eachposter->getVar('uname')), 'poster_rank_title' => $poster_rank['title'], 'poster_rank_image' => $poster_rank['image'], 'poster_status' => $poster_status);
$posterarr = array('poster_uid' => $eachposter->getVar('uid'), 'poster_uname' => '.XOOPS_URL.'/userinfo.php?uid='.$eachposter->getVar('uid').'">'.$eachposter->getVar('uname').'', 'poster_avatar' => $eachposter->getVar('user_avatar'), 'poster_from' => $eachposter->getVar('user_from'), 'poster_regdate' => formatTimestamp($eachposter->getVar('user_regdate'), 's'), 'poster_postnum' => $eachposter->getVar('posts'), 'poster_sendpmtext' => sprintf(_SENDPMTO,$eachposter->getVar('uname')), 'poster_rank_title' => $poster_rank['title'], 'poster_rank_image' => $poster_rank['image'], 'poster_status' => $poster_status, 'poster_groups' => GetGroupsNames($eachposter->getVar('uid')));
//----------------------end hack show groups by samuels---------------------------------------------------------
[/code]
And finally, look again for the line:
$posterarr = array('poster_uid' => $eachposter->getVar('uid'), 'poster_uname' => '.XOOPS_URL.'/userinfo.php?uid='.$eachposter->getVar('uid').'">'.$eachposter->getVar('uname').'', 'poster_avatar' => $eachposter->getVar('user_avatar'), 'poster_from' => $eachposter->getVar('user_from'), 'poster_regdate' => formatTimestamp($eachposter->getVar('user_regdate'), 's'), 'poster_postnum' => $eachposter->getVar('posts'), 'poster_sendpmtext' => sprintf(_SENDPMTO,$eachposter->getVar('uname')), 'poster_rank_title' => $poster_rank['title'], 'poster_rank_image' => $poster_rank['image'], 'poster_status' => $poster_status);
And change for:
//----------------------hack show groups by samuels-------------------------------------------------------------
//$posterarr = array('poster_uid' => $eachposter->getVar('uid'), 'poster_uname' => 'getVar('uid').'">'.$eachposter->getVar('uname').'', 'poster_avatar' => $eachposter->getVar('user_avatar'), 'poster_from' => $eachposter->getVar('user_from'), 'poster_regdate' => formatTimestamp($eachposter->getVar('user_regdate'), 's'), 'poster_postnum' => $eachposter->getVar('posts'), 'poster_sendpmtext' => sprintf(_SENDPMTO,$eachposter->getVar('uname')), 'poster_rank_title' => $poster_rank['title'], 'poster_rank_image' => $poster_rank['image'], 'poster_status' => $poster_status);
$posterarr = array('poster_uid' => $eachposter->getVar('uid'), 'poster_uname' => '.XOOPS_URL.'/userinfo.php?uid='.$eachposter->getVar('uid').'">'.$eachposter->getVar('uname').'', 'poster_avatar' => $eachposter->getVar('user_avatar'), 'poster_from' => $eachposter->getVar('user_from'), 'poster_regdate' => formatTimestamp($eachposter->getVar('user_regdate'), 's'), 'poster_postnum' => $eachposter->getVar('posts'), 'poster_sendpmtext' => sprintf(_SENDPMTO,$eachposter->getVar('uname')), 'poster_rank_title' => $poster_rank['title'], 'poster_rank_image' => $poster_rank['image'], 'poster_status' => $poster_status,'poster_groups' => GetGroupsNames($eachposter->getVar('uid')));
//----------------------end hack show groups by samuels---------------------------------------------------------
Ok, we have finished hacking newbb, now we need to change the newbb_thread.html template
ADVICE:THE DEFAULT TEMPLATESET CAN'T BE MODIFIED YOU MUST CLONE IT.After cloning the default templateset you must activate the new templateset in system preferences and edit the newbb_thread.html in the templateset manager.
I have made this one for showing the groups under number of posts:
<tr>
<td class="head"><a id="forumpost<{$topic_post.post_id}>">a> <{$topic_post.poster_uname}>td>
<td class="head"><div class="comDate"><span class="comDateCaption"><{$lang_postedon}>span> <{$topic_post.post_date}>div>td>
tr>
<tr>
<{if $topic_post.poster_uid != 0}>
<td class="odd"><div class="comUserRank"><div class="comUserRankText"><{$topic_post.poster_rank_title}>div><{$topic_post.poster_rank_image}>div><img class="comUserImg" src="<{$xoops_upload_url}>/<{$topic_post.poster_avatar}>" alt="" /><div class="comUserStat"><span class="comUserStatCaption"><{$lang_joined}>:span> <{$topic_post.poster_regdate}>div><div class="comUserStat"><span class="comUserStatCaption"><{$lang_from}>:span> <{$topic_post.poster_from}>div><div class="comUserStat"><span class="comUserStatCaption"><{$lang_posts}>:span> <{$topic_post.poster_postnum}>div>
<div class="comUserStat">
<span class="comUserStatCaption">Grupos:span> <br>
<{$topic_post.poster_groups}>
div>
<div class="comUserStatus"><{$topic_post.poster_status}>div>td>
<{else}>
<td class="odd"> td>
<{/if}>
<td class="odd">
<div class="comTitle"><{$topic_post.post_title}>div><div class="comText"><{$topic_post.post_text}>div>
td>
tr>
<tr>
<td class="even">td>
<{if $xoops_isadmin == true}>
<td class="even" align="right">
<a href="edit.php?forum=<{$forum_id}>&post_id=<{$topic_post.post_id}>&topic_id=<{$topic_id}>&viewmode=<{$topic_viewmode}>&order=<{$topic_order}>"><img src="<{$xoops_url}>/images/icons/edit.gif" alt="<{$lang_edit}>" />a><a href='delete.php?forum=<{$forum_id}>&topic_id=<{$topic_id}>&post_id=<{$topic_post.post_id}>&viewmode=<{$topic_viewmode}>&order=<{$topic_order}>'><img src="<{$xoops_url}>/images/icons/delete.gif" alt="<{$lang_delete}>" />a><a href='reply.php?forum=<{$forum_id}>&post_id=<{$topic_post.post_id}>&topic_id=<{$topic_id}>&viewmode=<{$topic_viewmode}>&order=<{$topic_order}>'><img src="<{$xoops_url}>/images/icons/reply.gif" alt="<{$lang_reply}>" />a>
td>
<{elseif $xoops_isuser == true && $xoops_userid == $topic_post.poster_uid}>
<td class="even" align="right">
<a href="edit.php?forum=<{$forum_id}>&post_id=<{$topic_post.post_id}>&topic_id=<{$topic_id}>&viewmode=<{$topic_viewmode}>&order=<{$topic_order}>"><img src="<{$xoops_url}>/images/icons/edit.gif" alt="<{$lang_edit}>" />a><a href='reply.php?forum=<{$forum_id}>&post_id=<{$topic_post.post_id}>&topic_id=<{$topic_id}>&viewmode=<{$topic_viewmode}>&order=<{$topic_order}>'><img src="<{$xoops_url}>/images/icons/reply.gif" alt="<{$lang_reply}>" />a>
td>
<{elseif $viewer_can_post == true}>
<td class="even" align="right">
<a href='reply.php?forum=<{$forum_id}>&post_id=<{$topic_post.post_id}>&topic_id=<{$topic_id}>&viewmode=<{$topic_viewmode}>&order=<{$topic_order}>'><img src="<{$xoops_url}>/images/icons/reply.gif" alt="<{$lang_reply}>" />a>
td>
<{else}>
<td class="even"> td>
<{/if}>
tr>
The smarty key is <{$topic_post.poster_groups}>
Ok, the hack is finished. Please, check on "Update module template .html files from themes/your theme/templates directory?" in your system preferences to charge the new template. If it's running you can disable it again.
Byeeeeeez