1 (edited by Dr.Jeckyl 2005-11-28 19:15)

Topic: Pun header and footer outside forum root

i'm building pages that will go outside the forum and so far not having luck including the punbb header and footer on pages that are outside the root folder.

the code i'm using i found here.

this is what i have:

<?php
 
define('PUN_ROOT', 'http://www.theplatoon.com/drj/');
define('PUN_QUIET_VISIT', 1);
require PUN_ROOT.'include/common.php';
 
//Set the page title here
$page_title = pun_htmlspecialchars($pun_config['o_board_title']) . ' / Rules';
define('PUN_ALLOW_INDEX', 1);
require PUN_ROOT.'header.php';
require PUN_ROOT.'include/parser.php';
 
?>
    

Rules go here


<?php
 
require PUN_ROOT.'footer.php';

i'm assuming it has something to do with

define('PUN_ROOT', 'http://www.theplatoon.com/drj/');

what do i need to change it to in order for my links to be correct and for the page to display correctly?

using the unmodified code the pages work great inside the forum root folder.

~James
FluxBB - Less is more

Re: Pun header and footer outside forum root

PUN_ROOT has to be relative

to make the links work you could add a <base> thing to header.php see - http://dev.punbb.org/file/branches/punb … header.php

Re: Pun header and footer outside forum root

cool thanks!

~James
FluxBB - Less is more

4

Re: Pun header and footer outside forum root

Be aware that if you use <base> to point to the index page then page anchors will cease to work i.e. they will always dump you back at the index page.