vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Help : <if> <else> issue (https://vborg.vbsupport.ru/showthread.php?t=290186)

TheSupportForum 11-05-2012 04:03 PM

Help : <if> <else> issue
 
1 Attachment(s)
i have the following script setup in header

PHP Code:

<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

PHP Code:

<vb:if condition="$show['guest']"><div class="noregister"></div></a></vb:if> 

an image is meant to appear saying we dont accept registration

2)

PHP Code:

<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

PHP Code:

<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> 



All times are GMT. The time now is 09:21 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01218 seconds
  • Memory Usage 1,726KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete