Hello there so I'm having some trouble. Now if I want to use PHP inside template I know I need to use the plugin correspondingly, and I am doing that. For now I'm just using conditionals, which I know is working.
<if !in_array($post['usergroup', array(8)) then>
do something
</if>
it will amazingly work, because it won't be able to find the post usergroup. Now I know that already, but I've tried almost everything to grab the correct GID, and amazingly not working. I don't want the user's current selected primary group, I want to check if the user is part of a group. And if it is I want to echo, or rather show a grouptag.
This is all inside the POSTBIT template, between
AND
I have also tried using globals etc.
Please, any input would be lovely, I am appreciating your time and help so much
I'm too much of a noob with MyBB :3
<if !in_array($post['usergroup'], array(8, 9, 10, 11, 12)) then>
<else />
<br />
<if in_array($post['usergroup'], array(8)) then>
<span class="grouptag grouptag_2" style="background-color:#029ddf;border:0px;"> WaterSpoof</span>
</if>
<if in_array($post['usergroup'], array(9)) then>
<span class="grouptag grouptag_2" style="background-color:#029ddf;border:0px;"> WaterSpoof</span>
</if>
<if in_array($post['usergroup'], array(10)) then>
<span class="grouptag grouptag_2" style="background-color:#029ddf;border:0px;"> WaterSpoof</span>
</if>
<if in_array($post['usergroup'], array(11)) then>
<span class="grouptag grouptag_2" style="background-color:#029ddf;border:0px;"> WaterSpoof</span>
</if>
<if in_array($post['usergroup'], array(12)) then>
<span class="grouptag grouptag_2" style="background-color:#029ddf;border:0px;"> WaterSpoof</span>
</if>
<br />
</if>
The above is what I'm trying to do. And if I use this<if !in_array($post['usergroup', array(8)) then>
do something
</if>
it will amazingly work, because it won't be able to find the post usergroup. Now I know that already, but I've tried almost everything to grab the correct GID, and amazingly not working. I don't want the user's current selected primary group, I want to check if the user is part of a group. And if it is I want to echo, or rather show a grouptag.
This is all inside the POSTBIT template, between
<div class="author_information">
<strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br />
<span class="smalltext">
<span class="grouptag grouptag_{$usergroup['gid']}"> {$post['usertitle']}</span><br />
AND
<span style="text-align: center;" class="userstar star_{$post['stars']}" title="{$post['usertitle']}"></span><br />
{$post['groupimage']}
</span>
</div>
I have also tried using globals etc.
Please, any input would be lovely, I am appreciating your time and help so much

I'm too much of a noob with MyBB :3