2020-06-16, 09:26 AM
Is it possible to create one template condition that allow specific usergroup can see part of post in specific forum else all group can see all part of post in all forum?
Is above code is right?
Thank you.
e.g I want usergroup 8 and 9 to show some part of template in forum id 148,156 and 197. and in all other forums , all usergroup can see whole post.
<if !in_array($mybb->usergroup['gid'], array('8','9')) & !in array($foruminfo['fid'] == '148' || $foruminfo['fid'] == '156' || $foruminfo['fid'] == '197'then>
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder1">
<tr>
<td class="thead1"><strong style="background-color: #C69A32;padding: 4px 11px 4px 14px;margin: -0.5%;color: #262626;"><i class="fa fa-user"></i> Welcome {$mybb->user['username']} </strong>
</td>
</tr>
</table></br>
<else>
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder1">
<tr>
<td class="thead1"><strong style="background-color: #C69A32;padding: 4px 11px 4px 14px;margin: -0.5%;color: #262626;"><i class="fa fa-user"></i> Welcome {$mybb->user['username']} </strong>
</td>
</tr>
<tr>
<td class="trow3">
<span><img class="avat" src="{$mybb->user['avatar']}" alt="My Avatar" title="My Avatar"/></span>
<span style="float: right;padding: 12px 35px 0px 0px;">
<div class="ublock"><a href="search.php?action=finduserthreads&uid={$mybb->user['uid']}"><i class="fa fa-th-large"></i> My threads</a></br>
<a href="search.php?action=finduser&uid={$mybb->user['uid']}"><i class="fa fa-comments"></i> My posts </a></br>
<a href="{$mybb->settings['bburl']}/private.php" title="Private Messages"><span><i class="menu-icon fa fa-envelope"></i> Messages <b class="pmboxcount" style="float: none;">{$mybb->user['pms_unread']}</b></a></br>
<li style="display: block;"><a href="{$mybb->settings['bburl']}/search.php?action=getnew" > <i class="fa fa-tags"></i> New Posts</a></li>
<li style="display: block;"><a href="{$mybb->settings['bburl']}/search.php?action=getdaily"> <i class="fa fa-star"></i> Today´s Posts</a></li></div>
</span>
</td>
</tr>
</table>
</if>
Is above code is right?
Thank you.