SEO-Board: Free, Fast and Search Engine Optimization Friendly Forum Script
»User: »Password:   Remember Me? 
SEO-Board Forum Software Community / General / Support / Embedding Forum into Website?
Posted:  26 May 2005 07:50
My site consist of php and I use this code..
<?php 
     
$va = $_GET['va']; 
if($va == "") {   
include("home.php");   
}   

else {   
if(file_exists("$va.php")) {   
include("$va.php");   
}   

else {   
include("error.php");   
}   

}   

?>

Basically what I wanted to do was if they click on va?=forum it would show up the forum inside the layout itself. Do you allow this, or the forum has to be seperate? This would help alot, because my layout is nice and I just want a neat mini forum inside of it. It would be really appreciated if you can help me fix this problem. Above the forum shows

Quote:
Warning: Cannot modify header information - headers already sent by (output started at /home/virtual/public_html/index.php:12) in /home/virtual/public_html/forum.php on line 18


And when I login it opens the forum seperately. I want it to load inside the layout as well. Thanks for your help.
Posted:  26 May 2005 10:51
You can patch the forum's index.php. However, you must include your design in the forums templates (mainheader, mainfooter). If you print sth out before the forum it won't work because it relies on sending headers late.
Basically: put all html code that will appear before the forum in mainheader.htm and put all html code that appears after the forum in mainfooter.htm. The forum can be enclosed in a table.

And then if you want to do everything with one .php file patch index.php. I would think it is better not to patch the index.php and keep the forum separate for the future upgrades.
Posted:  26 May 2005 19:56
Oh thanks! It works and I think this is the only forum that actually has that neat feature to it's simplicity.
Posted:  26 May 2005 20:03
Okay one last problem, I have php inside the mainheader and the file is .htm so php codes won't work. How exactly do I switch it to php without having "FATAL ERROR: File not found mainheader". Thanks.
Posted:  26 May 2005 20:34
You can't put php in the html templates. They are parsed with eval currently and the php won't get run.