PDA

View Full Version : Help : <if> <else> issue


TheSupportForum
11-05-2012, 04:03 PM
i have the following script setup in header


<vb:if condition="THIS_SCRIPT != 'register'">
<vb:if condition="$vbulletin->options['allowregistration']">
<vb:if condition="$show['guest']"><div class="noregister"></div></a></vb:if>
<vb:else />
<vb:if condition="$show['guest']"><a href="/register.php{vb:raw session.sessionurl_q}"><div class="forcetoregister"></div></a></vb:if>
</vb:if></vb:if>
i knows its wrong somewhere

1) <vb:if condition="$vbulletin->options['allowregistration']">
is called first if option is ==1 then if Guest show

<vb:if condition="$show['guest']"><div class="noregister"></div></a></vb:if>an image is meant to appear saying we dont accept registration

2)

<vb:if condition="$show['guest']"><a href="/register.php{vb:raw session.sessionurl_q}"><div class="forcetoregister"></div></a></vb:if>
</vb:if></vb:if>is shown all the time unless
<vb:if condition="$vbulletin->options['allowregistration']"> ==1

i knows its something like <vb:if condition="$vbulletin->options['allowregistration'] & $show['guest']">

for the first part but i am confused at this point i have attached what i hope to do the images are in the same order in which i want the condition meet

this is what i came up with, just need support in if i need to do anything else


<vb:if condition="THIS_SCRIPT != 'register'">
<vb:if condition="$vbulletin->options['allowregistration'] AND $show['guest']">
<div class="noregister"></div></a></vb:if>
<vb:else />
<vb:if condition="$show['guest']"><a href="/register.php{vb:raw session.sessionurl_q}"><div class="forcetoregister"></div></a></vb:if>
</vb:if></vb:if>