al3loo
12-08-2010, 01:10 PM
Hi,
I am trying to add if condition in bbcode_code template, but it seem not working well !
For example: I want to show a message for groups (2,5,6,7) inside the code <pre> .. its not work proparly! .. it will show even for guest so the if is not working
<div class="bbcode_container">
<div class="bbcode_description">{vb:rawphrase code}:</div>
<pre class="bbcode_code"<vb:if condition="$vboptions['codemaxlines']">style="height:<vb:if condition="$blockheight<$vboptions['codemaxlines']">{vb:math {vb:raw blockheight}*{vb:stylevar mid_fontSize}+{vb:stylevar mid_fontSize}*2}<vb:else />{vb:math {vb:raw blockheight}*{vb:stylevar mid_fontSize}+{vb:stylevar mid_fontSize}}</vb:if>;"</vb:if>><vb:if condition="is_member_of($bbuserinfo,2,5,6,7)">Test message</vb:if>{vb:raw code}</pre>
</div>
I tried even simple one like:
<vb:if condition="$show['member']">I am member<vb:else />I am not member</vb:if>
But it shows the same result for users and guest.
Am I doing something wrong !!
Best Regards,
I am trying to add if condition in bbcode_code template, but it seem not working well !
For example: I want to show a message for groups (2,5,6,7) inside the code <pre> .. its not work proparly! .. it will show even for guest so the if is not working
<div class="bbcode_container">
<div class="bbcode_description">{vb:rawphrase code}:</div>
<pre class="bbcode_code"<vb:if condition="$vboptions['codemaxlines']">style="height:<vb:if condition="$blockheight<$vboptions['codemaxlines']">{vb:math {vb:raw blockheight}*{vb:stylevar mid_fontSize}+{vb:stylevar mid_fontSize}*2}<vb:else />{vb:math {vb:raw blockheight}*{vb:stylevar mid_fontSize}+{vb:stylevar mid_fontSize}}</vb:if>;"</vb:if>><vb:if condition="is_member_of($bbuserinfo,2,5,6,7)">Test message</vb:if>{vb:raw code}</pre>
</div>
I tried even simple one like:
<vb:if condition="$show['member']">I am member<vb:else />I am not member</vb:if>
But it shows the same result for users and guest.
Am I doing something wrong !!
Best Regards,