vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=168)
-   -   template conditional help (https://vborg.vbsupport.ru/showthread.php?t=160539)

Benj 10-18-2007 11:16 PM

template conditional help
 
need something along the lines of

<if condition="this_page="pagename">

any ideas?

Adrian Schneider 10-18-2007 11:58 PM

Code:

<if condition="THIS_SCRIPT == 'pagename'">
where you are viewing pagename.php

Benj 10-20-2007 05:45 PM

works a treat n1, one thing tho anyway i can check if This_script = more than one page for example want to test if this script = index or forumdisplay

cheers

Freesteyelz 10-20-2007 06:12 PM

Try:

Code:

<if condition="in_array(THIS_SCRIPT, array('index', 'forumdisplay'))">

If you want to add more scripts just add a comma then the file name with the single quote.

Benj 10-21-2007 07:18 PM

n1 mate

--------------- Added [DATE]1193066800[/DATE] at [TIME]1193066800[/TIME] ---------------

yep back again...... :D


need to test if this script = forumdisplay.php?f=2 and index.php?sub=places how would i go about doing that....

thanks for the help so far guys!

Benj 10-23-2007 08:01 PM

bump

Freesteyelz 10-23-2007 08:06 PM

For specific forums you can use:

Code:

<if condition="in_array($forumid, array(x,y,z))">
</if>


Just replace "x,y,z" with the respective forum IDs. I'm not sure about "index.php?sub=places, however.


All times are GMT. The time now is 06:57 PM.

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.01122 seconds
  • Memory Usage 1,717KB
  • 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
  • (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