PDA

View Full Version : Make a page look like the rest of the forum


camoboy
08-24-2002, 01:35 PM
I'm making a page where users can configure a few options: It's pretty basic, just plain text at the moment

How can I get it to output the HTML header/footer as specified in the AdminCP for the style that the user has selected, and get other things like table/font colours, body tag etc etc.

Thanks for any help :)

Xenon
08-24-2002, 01:41 PM
you have to require global.php in front of the file

then make a new template containing
$header
Plain text formated as ya want
$footer

and at the end of your script use the eval-dooutput functions as you can see in nearly every vb-file
just replace the templatename with your new template ;)

camoboy
08-24-2002, 04:17 PM
Originally posted by Xenon
you have to require global.php in front of the file

then make a new template containing
$header
Plain text formated as ya want
$footer
Say I wanted to get the header that is already in the AdminCP under "fonts/colours/etc" for each style though? Can that be done?

g-force2k2
08-24-2002, 04:26 PM
camoboy start a phpfile like thisL

<?

error_reporting(7);

require('./global.php');

$templatesused = "[ template name here ]";

// all your php data here

eval("dooutput(\"".gettemplate("[ template name here ]")."\");");

?>

then create a new template:
Notice :: the name must be the one you use for the [ template name here ]

then in the template put ::

{htmldoctype}
<html>
<head>
$metarefresh
<title>$bbtitle - [ Title Info Here ]</title>
$headinclude
</head>
<body>
$header

<!-- html data here -->

$footer

</body>
</html>

replace each [ temlate name here ] with the name of your template and the [ title info here ] with the html title and then add whatever other data needed :)

that is what Xenon is saying to do ;)

And yes the $header variable in the template will get the same header that you see in the admin cp... its outputted because you required global.php hope that helps a little more regards...

camoboy
08-24-2002, 05:07 PM
Thanks very much both of you :cool: :)