The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
<vb:if condition="$bbuserinfo[userid]"> Not Working
I am trying to have my BBCODE contents not viewable unless the user is logged in. I found a hack from this forum that will allow conditionals in BBCODE. I've installed that too.
What I'm trying to do is use Code:
<vb:if condition="$bbuserinfo[userid]"> 'Something here <vb:else /> 'Something else here </vb:if> Code:
<div class="bbcode_container"> <div class="bbcode_description">{vb:rawphrase code}: <input type="button" value="Click To Select" onclick="selectAll(this); return false;"></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>> <code> <vb:if condition="$bbuserinfo[userid]"> {vb:raw code} <vb:else /> <b><font color="green">Hello Guest!</font></b> <font color="black"><p>To post questions, download files, to provide solutions to queries and <b>especially to view this code</b>, <a href="register.php"><u>register for free!</u></a></p> </vb:if> </code> </pre> </div> Code:
<div class="bbcode_container"> <div class="bbcode_description">{vb:rawphrase code}: <input type="button" value="Click To Select" onclick="selectAll(this); return false;"></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>><code>{vb:raw code}</code></pre> </div> --------------- Added [DATE]1365846255[/DATE] at [TIME]1365846255[/TIME] --------------- This isn't throwing any error. However, I am not getting the message for a guest. Instead, I am getting the actual contents of the BBCode even if a user is logged in or not Code:
<div class="bbcode_container"> <div class="bbcode_description">{vb:rawphrase code}: <input type="button" value="Click To Select" onclick="selectAll(this); return false;"></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>> <code> <vb:if condition="$bbuserinfo[userid]"> <b><font color="green">Hello Guest!</font></b> <font color="black"><p>To post questions, download files, to provide solutions to queries and <b>especially to view this code</b>, <a href="register.php"><u>register for free!</u></a></p> <vb:else /> {vb:raw code} </vb:if> </code> </pre> </div> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|