1 (edited by sanjay 2004-10-20 15:38)

Topic: Editing header.php

Hi guys,

I have a problem...

I want to remove the header above my forum. Because I want to insert my own header. But there is also vital code in the header so my question is how can I remove the things that the header outputs in the browser.

this stuff:
_____________________________________
PunBB.org Forums
Unfortunately no one can be told what PunBB is - you have to see it for yourself. 
Home | User list | Rules | Search | Profile | Logout

Logged in as sanjay.
Last visit: Today 11:00:11 
_____________________________________

Re: Editing header.php

you can edit

<table class="punmain" cellspacing="1" cellpadding="4">
    <tr class="punhead">
        <td class="punhead">
            <span class="puntitle"><pun_title></span><br>
            <pun_desc>
        </td>
    </tr>
    <tr>
        <td class="puncon1">
            <pun_navlinks><br><br>
            <pun_status>
        </td>
    </tr>
</table>

in main.tpl (includes/templates)

Re: Editing header.php

okay this I can work with but is it possible include something here? with the php function include I mean and if so what would be the code? the thing i want to include is head.php and its located in the root of my site. ???

Re: Editing header.php

read the help files that come with punbb

Re: Editing header.php

I had the same problem on my site, but after some work I finally just decided it's easier to just copy the header you have into the main.tpl file.  The only disadvantage is that I have to edit both the main.tpl and my header every time I want to change it but all I have to do is copy and paste.  .... not that bad

Re: Editing header.php

read the help files

3.4.  Is it possible to include my own PHP scripts in the templates?

Yes. PunBB has a special replacement variable called pun_include for including scripts in the templates. For example, if you wanted to include a script called banner.php (located in the forum root directory) at the bottom of all forum pages, you would add the following to your template files:

<pun_include "banner.php">

The path to banner.php is relative to the forum root directory. PunBB will execute the script and the pun_include variable will be replaced by any output that the script produces. Please note that all included scripts have access to the PunBB variables, so if you e.g. wanted to access the database, you could use the $db object just like the rest of PunBB does. Replacement of the pun_include variable is the last thing that PunBB does when it outputs a page, so you don't have to worry about not using variable names that PunBB uses.