Evilreindeer
Joined: 07 Feb 2003 Posts: 3
|
Posted: Fri May 09, 2003 9:05 pm Post subject: adding b2 another php script. |
|
|
I'm trying to get my b2 template post into this php script:
Code: | <?php
// variables
$default = "index.php"; // Doesnt have to be a .php file
$path = "./content/"; // you must have trailing slash!
if (!isset($page)) {
$page = $default ;
}
?>
<html>
<head>
<title>3rd-element Boards: PHP Script(1) - Loading file within a page based on query string</title>
</head>
<body>
<DIV align="center"><h1>This is the header</h1><br>
Maybe some menu links to be on everypage? <br><br>
<a href="index.php">Home</a> |
<a href="index.php?page=about">About</a> |
<a href="etc.php">ETC</a> |
</div>
<!-- page defined in query string loads here! -->
<? include ("$path$page"); ?>
<!-- this is the page -->
<br><br><br>
This is the footer on every page.
</body>
</html> |
the my template file for b2 is in the content folder:
Code: | <?php /* Don't remove this line, it calls the b2 function files ! */ $blog=1; include ("blog.header.php"); ?>
<!-- // b2 loop start -->
<?php while($row = mysql_fetch_object($result)) { start_b2(); ?>
<table width="394" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="blogdate"><?php the_date("","<b>","</b>"); ?></td>
</tr>
<tr>
<td class="blogtitle"><?php permalink_anchor(); ?>:: <?php the_title(); ?></td>
</tr>
<tr>
<td class="blogcontent"><?php the_content(); ?>
<?php link_pages("<br />Pages: ","<br />","number") ?></td>
</tr>
<tr>
<td class="blogending"><a href="<?php permalink_link() ?>"><?php the_time() ?></a> | <?php comments_popup_link("Comments (0)", "Comments (1)", "Comments (%)") ?>
<!-- this includes the comments and a form to add a new comment -->
<?php include ("b2comments.php"); ?></td>
</tr>
</table>
<br><br>
<!-- // this is just the end of the motor - don't touch that line either :) -->
<?php } ?> |
How can I fix this or is there another waay? I'm just a beginner at php. |
|