vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=253)
-   -   Stylevar conditionals? (https://vborg.vbsupport.ru/showthread.php?t=261795)

Guest210212002 04-11-2011 12:08 AM

Stylevar conditionals?
 
1 Attachment(s)
I'm not sure how to phrase the title for this..

I've got a background image for forumhead_background:

https://vborg.vbsupport.ru/attachmen...1&d=1302487138

I'd like that image to be different, depending on which forum it's the header image for. So if it's "Site news" it's forum #1, General Forums would be number 12 (whatever), etc, etc.

I think, that the VB3 way would have been a simple pointer to the forumid in the image itself, eg: "/forum/images/blah/header$forum['forumid'].png"

Since it's inside a stylevar, I'm not sure how to go about it this time. I'm looking to take my header image (catheader.png), and make a few version of it, so catheader_1.png for forumID #1, catheader_12 for #12, and so on.

Would I need to preregister all of those conditionals, or is there a way that I can just directly pull the raw forumid inline with the image ponter in the stylevar?

Something like this horrible syntax:

Code:

url(images/misc/catheader_<vb:raw forumid>.png)

Attitude5ire 04-11-2011 05:16 AM

Not really the right method to go about it..
If you look at the code for your forumhome you will see each <li> has a unique id which is normally forum2, forum3 etc..

You are better off following that route and connecting that with your custom CSS. Im not quite certain if Style vars take the conditionals, even if they do you would have to have a new style var for each background..

Guest210212002 04-11-2011 08:30 PM

Thanks man - I'll definitely go about it that way. I'm just (last few days or so) starting to build my theme, and slowly wrapping my head around the new template system.

I think I'm going to end up rewriting a LOT of CSS. :(


All times are GMT. The time now is 04:26 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.01452 seconds
  • Memory Usage 1,711KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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