foler
12-07-2008, 10:43 PM
I'm using vB 3.7.3 PL1. The template in question is "bbcode_code".
I want to block guest from viewing text inside CODE tags. This is what I've done:
<if condition="$show['member']">
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px">$vbphrase[code]:</div>
<pre class="alt2" dir="ltr" style="
margin: 0px;
padding: $stylevar[cellpadding]px;
border: 1px inset;
width: $stylevar[codeblockwidth];
height: {$blockheight}px;
text-align: left;
overflow: auto">$code</pre>
</div>
<else />
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px">$vbphrase[code]:</div>
<pre class="alt2" dir="ltr" style="
margin: 0px;
padding: $stylevar[cellpadding]px;
border: 1px inset;
width: $stylevar[codeblockwidth];
height: {$blockheight}px;
text-align: left;
overflow: auto">You must be logged in to view this content.</pre>
</div>
</if>
I open the post in Google Chrome where I'm logged in, and another instance in IE where I'm not and I'm able to see code in both browsers :mad:
What am I doing wrong?
Thanks in advance.
I want to block guest from viewing text inside CODE tags. This is what I've done:
<if condition="$show['member']">
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px">$vbphrase[code]:</div>
<pre class="alt2" dir="ltr" style="
margin: 0px;
padding: $stylevar[cellpadding]px;
border: 1px inset;
width: $stylevar[codeblockwidth];
height: {$blockheight}px;
text-align: left;
overflow: auto">$code</pre>
</div>
<else />
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px">$vbphrase[code]:</div>
<pre class="alt2" dir="ltr" style="
margin: 0px;
padding: $stylevar[cellpadding]px;
border: 1px inset;
width: $stylevar[codeblockwidth];
height: {$blockheight}px;
text-align: left;
overflow: auto">You must be logged in to view this content.</pre>
</div>
</if>
I open the post in Google Chrome where I'm logged in, and another instance in IE where I'm not and I'm able to see code in both browsers :mad:
What am I doing wrong?
Thanks in advance.