Okay, thanks!
Also, when I have my default site index (index.php) in the root directory, is there a way to change the forum index.php (to forum.php or something) so I wouldn't have to change the site? Or is there a way to get it the same as $_GET['view'] == 'forum'?
Anyway, I just bought this up: The reason why I want to change the directory is so that I can include the login data on normal webpages aswell. This is on my index.php (site):
<?php
define('PUN_ROOT', './forum/');
define('PUN_TURN_OFF_MAINT', 1);
if($pun_user['is_guest'] == "TRUE")
{
echo "Welkom! <a href=\"/forum/login.php\">Log in</a> of <a href=\"/forum/register.php\">registreer</a>.";
}
else
{
echo "Welkom, <strong>".pun_htmlspecialchars($pun_user['username'])."</strong>!<br><br>";
}
?></td>
<td><div align="right">
<?php
define('PUN_ROOT', './forum/');
define('PUN_TURN_OFF_MAINT', 1);
if($pun_user['is_guest'] == "TRUE")
{
}
else
{
echo "<a href=\"/forum/profile.php?id=".pun_htmlspecialchars($pun_user['id'])."\">Profiel</a> - <a href=\"/forum/message_list.php\">Berichten</a>";
}
?>
I also have a script on the same page (index.php) that lets me include other pages (for example, index.php?page=apagelol):
<?
if(empty($_GET['page'])) {
include("neus.php");
} else {
if(eregi("http://",$_GET['page'])) {
echo "Het is niet toegestaan externe pagina's in te voegen.";
} elseif(file_exists($_GET['page'].".html")) {
include($_GET['page'].".html");
} elseif(file_exists($_GET['page'].".php")) {
include($_GET['page'].".php");
} else {
echo "404 error, pagina niet gevonden.";
}
}
?>
But when I use these two codes together, the first one gets an error. This does not happen when I put this page in the PunBB forum directory (modified it, of course). So is there a way to get it anyway, or do I have to 'fuse' my forum and site directories?