vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Advanced Templates: Dynamic Templates Changing according to different conditions (https://vborg.vbsupport.ru/showthread.php?t=43325)

Wildthinks 10-09-2002 08:19 AM

Quote:

Originally posted by Logician

It should and I tested it and it does here..

Can you give more info? What was your exact conditional and in which template did you use it?

sorry wrong thread... the problem is in the announcement script ...
i wrote there ... Sorry...

Colon33 10-13-2002 02:59 AM

I run vb 2.2.6 right now, and was always afraid to update to 2.2.7 and then to 2.2.8 because many people said there templates messed up and hacks messed up... is it safe to upgrade a board that has alot of template changes and runs a whole RPG setup complete with itemshop and everything? Cause i really want to install this hack to add more atmosphere to an already interactive board.

Logician 10-13-2002 08:43 AM

Quote:

Originally posted by Colon33
I run vb 2.2.6 right now, and was always afraid to update to 2.2.7 and then to 2.2.8 because many people said there templates messed up and hacks messed up... is it safe to upgrade a board that has alot of template changes and runs a whole RPG setup complete with itemshop and everything? Cause i really want to install this hack to add more atmosphere to an already interactive board.
Colon33, upgrading the board does not mess the templates but if you have hacks applied you'll lose them and need to reapply. So it may be a problem for you if you have a lot of hacks.

But the good news is this hack does not require 2.2.8 to work. I think I mentioned in the first message of the thread as well: It works with all vb versions. I coded it in 2.2.6 and my board is still 2.2.6 and it has no problems.. ;)

So go ahead and install it..

Dean C 10-14-2002 06:20 PM

whats the conditional for forumid?

Regards

- miSt

Logician 10-15-2002 09:53 AM

Quote:

Originally posted by Mist
whats the conditional for forumid?

It may change according to the template you are applying but usually $forumid will do the trick. You can check the template code (or script code that calls that template) to see if another variable is used or not (like $threadinfo[forumid])

Dean C 10-15-2002 03:39 PM

ill do it forumdisplay .

so what will be the conditional code i can use in the template

i.e. the one in " [ "'s

- mISt

Logician 10-16-2002 09:17 AM

Quote:

Originally posted by Mist
ill do it forumdisplay .

so what will be the conditional code i can use in the template

i.e. the one in " [ "'s

- mISt

($forumid==X)

Dean C 10-16-2002 03:44 PM

so if i put this in my forumdisplay template it would only apply to the forum whose id is 2

PHP Code:

[(forumid==2)]
Test
[/(forumid==2

?

Regards

- miSt

Logician 10-17-2002 11:55 AM

Quote:

Originally posted by Mist
so if i put this in my forumdisplay template it would only apply to the forum whose id is 2

PHP Code:

[(forumid==2)]
Test
[/(forumid==2


Yes it should.. However dont forget the closing ) in the second line..

Dean C 10-17-2002 05:31 PM

hehe oops

Right one more question... can you have a global conditional as well as single conditionals

Cuz im my forumdisplay template i want to have one template for a specific forum and i want the default template to apply for the rest... Im sick of doing this with extra styles and assigning a forum a specific style set as it gets too confusing

I want to use something like this in my forumdisplay template:

PHP Code:

[(forumid==2)]
This will be the template for the forums whose id is 2
[/(forumid==2)]

[(
forumid==Restofforums)]
This will be the template for all other forums that haven't got a conditional assigned to them
[/(forumid==Restofforums)] 

_______

Any ideas?

Regards

- miSt


All times are GMT. The time now is 05:35 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.01581 seconds
  • Memory Usage 1,745KB
  • 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_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)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