vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   VB conditional (https://vborg.vbsupport.ru/showthread.php?t=252322)

Blooded 10-20-2010 01:35 AM

VB conditional
 
Well i want to know how to add a conditional that made some image or anything i want to show to an specific group but only on some specific templates.

To be more clear, i want to show a register button in all the forum except in the register.php page.

I know there is a template called register but i didn't see any conditional to use on templates, i see for forum id user groups etc but not for templates.

Well thats everything.

Thanks in advance :)

Lynne 10-20-2010 03:22 AM

Sounds like you want to use THIS_SCRIPT. To show something on all pages but the registration page:
HTML Code:

<vb:if condition="THIS_SCRIPT != 'register'">
stuff
</vb:if>


Blooded 10-20-2010 04:33 AM

yeah thats the one thanks Lynne i search it here:
http://www.vbulletin.com/docs/html/t...e_conditionals

but didnt find it :(

Lynne 10-20-2010 01:38 PM

Take a look in the articles forums as there are articles in there that cover a lot more conditionals than those few in the manual.

Blooded 10-22-2010 09:45 PM

Well i just cant make it work :S
Use this

Code:

<vb:if condition="THIS_SCRIPT != 'register'" and "$show['guest']">
But i show to all groups :( is not showing up in the registration page but is not workin for the conditional show

Lynne 10-22-2010 09:54 PM

A condition is surrounded by double-quotes. You ended your condition right after the condition regarding the script 'register' - it never looked at show.guest. You need to do it more like this:

HTML Code:

<vb:if condition="THIS_SCRIPT != 'register' and $show['guest']">

Blooded 10-22-2010 09:57 PM

Oh i see :D

vbulletin uses the "" like php uses the () for several conditions in one if

thanks a lot :)


All times are GMT. The time now is 08:40 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.01126 seconds
  • Memory Usage 1,721KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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