Topic: HOW-TO: customize elements on sub-boards
Ever wanted to change the site appearance a wee bit for each of your sub-boards? A different colour for the headers maybe, or the background, or your standard font, or all of those? Here's a how-to for those who share my customization need:
It's really easy as pie, just add the following code to your page.php file:
///colour-code
$path_to_color = array("/a" => "#abc",
"/b" => "#000",
"/c" => "#cab",
"/d" => "#fff"
);
$path = parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH);
//echo $path; //uncomment if the code fucks up
if(isset($path_to_color[$path])){
$tmpl->setVariable("COLOR", $path_to_color[$path]);
}else{
$tmpl->setVariable("COLOR", "#aaa");
}
///end colour-code
Naturally, you will need to specify your own sub-boards and colours in the first few lines.
Afterwards just add {COLOR} at any point you want in your templates (including - of course - css specifications _within_ the templates) The code will _NOT_ work if you add {COLOR} in your .css file.
For multiple colour changes just introduce more variables.
atm I've only just used/tested this for colours because they're the most handy way of customizing sub-boards whilst maintaining consistency. - But there's no reason why the code wouldn't work for other parameters: width, font-weight, font-family, even div id or class names. Maybe this could even serve as a starting point for some un-hackish way of stylizing sub-boards autonomously. Just take it from here and start experimenting.
Have phun kids.