vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How do I determine my current style (https://vborg.vbsupport.ru/showthread.php?t=72603)

Michael Morris 12-07-2004 02:49 PM

How do I determine my current style
 
Hello again. Ok, this may seem like a dumb question, but bear with me. I need to know which variable has the styleid of the currently loaded style so I can build conditionals around it. Yes, I know I can have a seperate copy of phpinclude_start for each style, but I don't want that - I want each child style to inherit all templates from the default and the only thing each style would change is the CSS.

Zachery 12-07-2004 02:52 PM

Quote:

Originally Posted by Michael Morris
Hello again. Ok, this may seem like a dumb question, but bear with me. I need to know which variable has the styleid of the currently loaded style so I can build conditionals around it. Yes, I know I can have a seperate copy of phpinclude_start for each style, but I don't want that - I want each child style to inherit all templates from the default and the only thing each style would change is the CSS.

Then why not just use parrent child templates?

Thats the whole idea, all templates are stored in the master parrent style, then style changes are applied to all the lesser templates.

Michael Morris 12-07-2004 04:38 PM

Ok, the logo in the $header of my site is rotated by forum using a hack that stores the image's name. I need to change the version of the image by styleset because some have dark backgrounds and others have light ones, and so on. So in PHP include start...

PHP Code:

if (styleid=3
{
$stylevar[titleimage] = "styledirectory/" $foruminfo[banner]


Now, I could just put that code in the PHP include start template of the style, but it will cease to inherit PHPinclude start code templates from the parent style. That's a problem I'd rather avoid by using the conditional.

Zachery 12-07-2004 05:32 PM

Quote:

Originally Posted by Michael Morris
Ok, the logo in the $header of my site is rotated by forum using a hack that stores the image's name. I need to change the version of the image by styleset because some have dark backgrounds and others have light ones, and so on. So in PHP include start...

PHP Code:

if (styleid=3
{
$stylevar[titleimage] = "styledirectory/" $foruminfo[banner]


Now, I could just put that code in the PHP include start template of the style, but it will cease to inherit PHPinclude start code templates from the parent style. That's a problem I'd rather avoid by using the conditional.

then use

$bbuserinfo[styleid]_$stylevar[titleimage] ;P

Michael Morris 12-07-2004 06:54 PM

And if the forum overrides the user's style choice??

Zachery 12-07-2004 08:20 PM

Quote:

Originally Posted by Michael Morris
And if the forum overrides the user's style choice??

$foruminfo[styleid] IIRC


All times are GMT. The time now is 03:51 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.01164 seconds
  • Memory Usage 1,729KB
  • 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
  • (2)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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