Topic: Wrong paths and such when banning outside of site.com/forums

Im using this on all my pages outside of site.com/forum/

define('PUN_ROOT', './forum/');
require PUN_ROOT.'include/common.php';

This gives me $pun_user to use on my pages.

Anyway, when setting a ban, the user is rejected even if site.com/ is visited (not only site.com/forum/). This is how it should be i guess....

But the problem is that when banned users visit site.com/ all the links and stylesheets are wrong. Links refer to site.com/login.php, site.com/profile.php and so on instead of site.com/forum/login.php and site.com/forum/profile.php ...

well, it's actually no big problem. Banned users are banned, and no harm if what they see is not perfect, but anyway, I thougt I should bring this up. Am I doing something wrong maybe?

Re: Wrong paths and such when banning outside of site.com/forums

Well, the links aren't absolute paths. So, the way it's behaving is how it should (it assumes it's in the forum directory). You could always alter the banning feature in functions.php so it doesn't work outside of the forum folder...

Re: Wrong paths and such when banning outside of site.com/forums

But I want it to work outside of the forum dir. And yes, the links aren't absolute paths, but thats the issue in this case smile

Re: Wrong paths and such when banning outside of site.com/forums

Yes, the links weren't meant to be: the banning was made to be done in the forum wink
You can do something like I did with parser.php, which is add PUN_ROOT to the beginning of all the links.