PDA

View Full Version : Using user's style in php page?


Sven
03-25-2002, 03:40 PM
I'd like to add a link to a php page (which will display some special behaviour rules) to the top links.

I tried this:
<?php
error_reporting(7);
require('./global.php');
include ("regeln.txt");
?> to achieve the page is displayed in the style the user clicking the link is using and to include the header and footer of the forums home page (I read somewhere global.php would do that automatically).
But it won't work :(

Can someone please give me an advice (I'm a php newbie) how to get it done?

The same happens if I try to use it as a template:
<?php
error_reporting(7);
$templatesused = "regeln";
require("./global.php");
eval("dooutput(\"".gettemplate("regeln")."\");");
?>

I'm getting a white page with the content of the template "regeln" but no style and no header and footer

Admin
03-26-2002, 05:12 AM
Well, you need to actually add $header, $footer, etc. in the regeln template.

{htmldoctype}
<html>
<head>
<title>Your title here</title>
$headinclude
</head>
<body>
$header

Your text here

$footer
</body>
</html>

Sven
03-26-2002, 06:50 AM
Thank you, works like a charm now.

I added the code into the misc.php and call it as a template ;)