vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=242)
-   -   vB4 Template Conditionals List (https://vborg.vbsupport.ru/showthread.php?t=231525)

Draffi 09-09-2012 12:24 AM

@:BBR-APBT

Thank you!

BirdOPrey5 09-11-2012 11:18 AM

Quote:

Originally Posted by vbxmod (Post 2363470)
Is it possible to add conditional registration usergroup submission. If the user select group x then the user will automatically added in that user group or it will go to default registration group.
Thank you for your attention.

No, not possible via template conditionals.

Stefan118 09-21-2012 07:20 PM

Quote:

Originally Posted by tareqbd (Post 2360348)
Not working in vbulleting 4.2.0
Anybody help please.

Use this:
<vb:if condition="in_array($GLOBALS['forumid'], array(1,2,3,))">Show this to forum 1, 2 and 3</vb:if>

instead of this:
<vb:if condition="in_array($forum['forumid'], array(1,2,3))">Show this to forum 1, 2 and 3</vb:if>


Edit: Ok, next time i will read first, and post later :)

tareqbd 09-22-2012 02:23 PM

Quote:

Originally Posted by Stefan118 (Post 2367423)
Use this:
<vb:if condition="in_array($GLOBALS['forumid'], array(1,2,3,))">Show this to forum 1, 2 and 3</vb:if>

instead of this:
<vb:if condition="in_array($forum['forumid'], array(1,2,3))">Show this to forum 1, 2 and 3</vb:if>


Edit: Ok, next time i will read first, and post later :)

Worked with BOP5's suggestion. same output from you too.
Thank you both of you.

ldma 09-26-2012 08:28 PM

Can anyone tell me how to do this...

Code:

Show in only one file: Look for define('THIS_SCRIPT', 'calendar'); in the top of the php file you want it to show in.
Code:
<vb:if condition="THIS_SCRIPT == 'calendar'">Show this only on calendar.php</vb:if>

...but want to do it to my VBadvance Portal page which is index.php but on my domain root, not the forum root.

dougdirac 09-26-2012 09:10 PM

Quote:

Originally Posted by ldma (Post 2368811)
Can anyone tell me how to do this...

Code:

Show in only one file: Look for define('THIS_SCRIPT', 'calendar'); in the top of the php file you want it to show in.
Code:
<vb:if condition="THIS_SCRIPT == 'calendar'">Show this only on calendar.php</vb:if>

...but want to do it to my VBadvance Portal page which is index.php but on my domain root, not the forum root.

I think it's the same. Just find out what index.php is setting THIS_SCRIPT equal to.

ldma 09-26-2012 09:28 PM

Wonderful.. adv_index ...thankyou!

chikuru 10-01-2012 04:36 PM

whats the conditional for this:

show this in all pages except in showthread of forum 1 and 2

the code will be placed on "below navbar banner"

BirdOPrey5 10-02-2012 08:48 PM

hmmmm... try...

Code:

<vb:if condition="THIS_SCRIPT != 'showthread' OR !in_array($GLOBALS['forumid'], array(1, 2))">
code here
</vb:if>

That will show on any page NOT a showthread page, or if it is a showthread page, as long as it's not forum 1 or forum 2.

jluerken 10-03-2012 12:23 PM

How does the template conditional need to look like if I want a text to appear if the forum is closed?

SHOW NOT abc if board is closed, ELSE show def...


All times are GMT. The time now is 10:19 PM.

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

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01568 seconds
  • Memory Usage 1,742KB
  • 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
  • (3)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete