PDA

View Full Version : How do I determine my current style


Michael Morris
12-07-2004, 02:49 PM
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
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...


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
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...


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
And if the forum overrides the user's style choice??
$foruminfo[styleid] IIRC