cellarius |
03-17-2014 02:59 PM |
There's two ways basically. If you have just a few usergroups and don't change them often, you could just do this using several if-conditions in the template. Disadvantage: If you add a new usergroup, you have to edit the template again. But normally you probably won't do that all that often. (Very) big advantage: You save database queries.
You'd go as follows:
In postbit or postbit_legacy template find
Code:
{vb:raw template_hook.postbit_userinfo_right}
Then add above:
Code:
<vb:if condition="in_array($bbuserinfo['usergroupid'], array(5,6,7))">
<span style="font-weight: bold;">Usergroups:<br /></span>
<vb:if condition="in_array($post['usergroupid'], array(6))">Administrator</vb:if>
<vb:if condition=" in_array($post['usergroupid'], array(5))">Super-Moderator</vb:if>
<vb:if condition=" in_array($post['usergroupid'], array(7))">Moderator</vb:if>
<vb:if condition=" in_array($post['usergroupid'], array(2))">Registered User</vb:if>
</vb:if>
I think you get the drill. Just add another line per usergroup you want to show.
Doing it with a plugin would be a bit more complicated, and would add a query per post on the page.
|