PDA

View Full Version : Forums and PHP,,, Help Please


JamesQ
July 22nd, 2006, 12:53 PM
Hi, i need a bit of help editing a php forum

I have a php forum from phpbb and the main index of the forum is pure php e.g. the file starts <?php and ends ?>

I want to insert some HTML code in to it but when i do i get an error about not being able to change headers as they are already provided by some variable... Im am probly just doing it the wrong way. What i want to do is insert HTML into the php file so that i can integrate the forum so it appears in a page with my sites main template...

can anyone help...
thanks

JamesQ
July 22nd, 2006, 01:57 PM
Ok, problem sorted

just incase anyone else has same problem...

i just copied the php code into the html file and saved it as .php

then to get rid of the header warning i wraped the code in this:

<? ob_start(); ?>
<html>
all html code and php code in hear!!
</html>
<?
$pContentsStr = ob_get_contents();
ob_end_clean();
echo $pContentsStr;
?>

Problem solved!!

PS. Why does the admin/mod keep deleting my sig??

degsy
July 22nd, 2006, 02:38 PM
You have gone the wrong way about it. If phpBB doesn't have the appropriate section in the adminCP to change the template/skin then you should create a new skin and edit the tpl files.
http://www.phpbb.com/kb/list_articles.php?category_id=4

No idea what you mean about your signature.

JamesQ
July 22nd, 2006, 03:03 PM
I can change templates and skins but i dont see how that helps, i want the forum as part of my site and not a sperarate page...

Just realised, to see your sig you need to be logged in...

degsy
July 22nd, 2006, 03:22 PM
Yes, by creating a new skin/template/theme (whatever you want to call it) you can incorporate your own coding to make it how you want it.

I haven't skinned phpBB for a long time, so it you have it working as you want it then leave it as is.

JamesQ
July 22nd, 2006, 06:09 PM
thanks degsy, i found the template folder and edited it, its actually quite easy...