displaying forums posts or a forum in a index page

Seperate the design into 2 files, header.php and footer.php (or .html) then use includes.

That would be the easiest way. http://www.w3schools.com/PHP/php_includes.asp

All you would need to do is split your template into 2 files and include the content, i'll give you an example....

Code:
<?php require_once ('header.php');?>

Forum page

<?php require_once ('footer.php');?>
header.php
Code:
<div id="logo"><a href="logo.gif" alt="" width="414" height="56" border="0" /></a></div>

<div id="left">Put left content here</div>

<div id="content">
footer.php
Code:
</div>
 
 <div id="right">Put right content here</div>
 
Last edited:
Plonked all the code in one file before, not the intention, edited, see example....

You can just do the same with the left and right content also....

Example, on this line in header.php (of my example)..

Code:
<div id="left">Put left content here</div>
You could then just include...

Code:
<div id="left">
<?php include_once ('yourfile.php'); ?>
</div>

Of course remembering to use all the necessary tags in your own code.... eg. HTML, BODY... etc.... :)
 
Ok ive made the script prettyfied imo :P
here it is :D

Basically under the forum tab on the right, the script captures data from the forum and displays it within this simple but pretty div tag :P
Anyway let me know what you think of it all, it will serve as a website for second life and lord of the rings mines of moria users.
Oh well im still adding it to my portfolio :cool:

phpforumscriptkm5.jpg
 
Looks ok to me, but i'd personally do something more with the tabs....

Not sure why but something about them doesn't look right.

And out of curiousity, whats the icon in firefox next to the home icon?
 
Back
Top Bottom