PHP Code:
// ############################### start customized templates ###############################
if ($action=="custom") {
include("./global.php");
if ($bbuserinfo[cpbenabled]!=0 and $bbuserinfo[userid]!=-1) {
eval("\$tplink = \"".gettemplate("custom_template1")."\";");
} elseif ($bbuserinfo[cpbenabled]!=0 and $someid!=somevalue) {
eval("\$tplink = \"".gettemplate("custom_template2")."\";");
} else {
eval("\$tplink = \"".gettemplate("custom_template3")."\";");
}
}
If you want to use the [high]dooutput()[/high] function, do this:
PHP Code:
// ############################### start customized templates ###############################
if ($action=="custom") {
include("./global.php");
if ($bbuserinfo[cpbenabled]!=0 and $bbuserinfo[userid]!=-1) {
eval("dooutput(\"".gettemplate("custom_template1")."\");");
} elseif ($bbuserinfo[cpbenabled]!=0 and $someid!=somevalue) {
eval("dooutput(\"".gettemplate("custom_template2")."\");");
} else {
eval("dooutput(\"".gettemplate("custom_template3")."\");");
}
}
In the [high]dooutput()[/high] case, your [high]custom_template[/high] should look like this:
Code:
{ htmldoctype }
<html>
<head>
<title>$bbtitle - bla bla</title>
$headinclude
</head>
<body>
$header
<!-- your html code here -->
$footer
</body>
</html>