dolus
11-03-2014, 12:54 PM
I've been trying to get a different background appear in the postbit_legacy for different usergroups.
I got 2 different types to appear ok, but when i add more it breaks. This is the code i'm using:
<vb:if condition="is_member_of($post, 6)">
<div class="postbit_admin">
<vb:else if condition="is_member_of($post, 2)" />
<div class="postbit_member">
<vb:else if condition="is_member_of($post, 7)" />
<div class="postbit_moderator">
<vb:else if condition="is_member_of($post, 8)" />
<div class="postbit_banned">
<vb:else if condition="is_member_of($post, 9)" />
<div class="postbit_suspended">
<vb:else if condition="is_member_of($post, 10)" />
<div class="postbit_ripper">
<vb:else if condition="is_member_of($post, 11)" />
<div class="postbit_vendor">-->
<vb:else />
</vb:if>
I always have trouble with IF statements.
If I do it only for the first two it works fine, but when I do it for all of them it goes mental.
Can anyone see where I have gone wrong?
I got 2 different types to appear ok, but when i add more it breaks. This is the code i'm using:
<vb:if condition="is_member_of($post, 6)">
<div class="postbit_admin">
<vb:else if condition="is_member_of($post, 2)" />
<div class="postbit_member">
<vb:else if condition="is_member_of($post, 7)" />
<div class="postbit_moderator">
<vb:else if condition="is_member_of($post, 8)" />
<div class="postbit_banned">
<vb:else if condition="is_member_of($post, 9)" />
<div class="postbit_suspended">
<vb:else if condition="is_member_of($post, 10)" />
<div class="postbit_ripper">
<vb:else if condition="is_member_of($post, 11)" />
<div class="postbit_vendor">-->
<vb:else />
</vb:if>
I always have trouble with IF statements.
If I do it only for the first two it works fine, but when I do it for all of them it goes mental.
Can anyone see where I have gone wrong?