Topic: nothing to see without login

is it possible, that without login, only thing you see is a login form? how can i make such a thing happen?

best wishes,
magnus

Re: nothing to see without login

nobody? is it really so hard to do?

3

Re: nothing to see without login

A quick and dirty hack is:

Open include/functions.php

find line 104 (or so, I have some mods.. smile )  that says

    else
        set_default_user();

instead of set_default_user you can write

Header("Location:".PUN_ROOT."login.php");
The German PunBB Site:
PunBB-forum.de

Re: nothing to see without login

thank you for your answer, but it still did not solve the problem. now it does not show any page, instead i get an error message: "Redirection limit for this URL exceeded. Unable to load the requested page. This may be caused by cookies that are blocked" well, cookies are not blocked... might there be a problem with the cookies path or smth?

5 (edited by Tobi 2005-08-02 17:17)

Re: nothing to see without login

No,
that happens because it is a quick and dirty hack. smile
A bit cleaner version would be

elseif(!ereg("login\.php", $_SERVER['SCRIPT_FILENAME']))
   Header("Location:".PUN_ROOT."login.php");

instead of

else
  set_default_user();
The German PunBB Site:
PunBB-forum.de

6

Re: nothing to see without login

Here is something I tested that definitely works:

http://punbb.org/forums/viewtopic.php?pid=48883#p48883

The German PunBB Site:
PunBB-forum.de

Re: nothing to see without login

thank you very much, Tobi! works very well. and the part where nobody can't register suits me very well because its going to be an intranet. So, thank you.

Re: nothing to see without login

Is it possible to just hide post from guest but leave topic titles?
Like for eg. on portal page guest see some recent topic list and when he clicks on it forum tell them that they require registration to see that topic.

.thanx