Sworm
12-06-2011, 09:21 PM
Hi all, i have need that somebody confirm me if this tpl edit is correct to hide the CODE tag content. I hope that is correct
I have opened the tpl bbcode_code and i have addedd this conditional:
Original tpl:
<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:raw code}</pre>
</div>
My Edit tpl:
<vb:if condition="is_member_of($bbuserinfo, 1,2,3,4,)">
<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:raw code}</pre>
</div>
<vb:else />
<a href="http://mysite.net/register.php" target="_blank"> Only Registered and Logged users can see this content.</a>
</vb:if>
It is a good solution ? or must i add the if condition="$bbuserinfo[usergroupid] to hide the code tags contents to guests?
Somebody can suggest me the best solution please? Thanks in advance
I have opened the tpl bbcode_code and i have addedd this conditional:
Original tpl:
<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:raw code}</pre>
</div>
My Edit tpl:
<vb:if condition="is_member_of($bbuserinfo, 1,2,3,4,)">
<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:raw code}</pre>
</div>
<vb:else />
<a href="http://mysite.net/register.php" target="_blank"> Only Registered and Logged users can see this content.</a>
</vb:if>
It is a good solution ? or must i add the if condition="$bbuserinfo[usergroupid] to hide the code tags contents to guests?
Somebody can suggest me the best solution please? Thanks in advance