boardom Forum Index boardom
b2 message board
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

adding b2 another php script.

 
Post new topic   Reply to topic    boardom Forum Index -> PHP help
View previous topic :: View next topic  
Author Message
Evilreindeer



Joined: 07 Feb 2003
Posts: 3

PostPosted: Fri May 09, 2003 9:05 pm    Post subject: adding b2 another php script. Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:   
Post new topic   Reply to topic    boardom Forum Index -> PHP help All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2 © 2001, 2002 phpBB Group