How can Guests only access portal page?

Current Version: 1.0.6
Released: 09.01.10
Forum rules
Before creating a new support thread, please take a look in the board3 Portal FAQ and use the search!
Many questions have already been answered.
Locked

Topic author
manxminx
Active Member
Posts: 2
Joined: 11. November 2008 09:51

How can Guests only access portal page?

Post by manxminx »

Your Portal Version: 1.0.0RC3
Your phpBB Type: Standard phpBB3
MODs installed: Yes
Your knowledge: Advanced Knowledge

What have you done before the problem was there?
N/A

What have you already tryed to solve the problem?
variuos bits of code

Description and Message
Hia, and firstly, thanks for a wonderful portal.

I have done a thorough search but not found an answer, so forgive me if this has been asked before. Also, seeing as this question is related to the portal, I do not feel it is a general phpBB support question.

What I'd like is for guests not to have any access to any pages except the portal and a special 'about us' page I have written. For example, If they try to view index.php or ucp.php, they get automatically redirected to the portal page (rather than the login script - I only want people to login on the portal page). If they want to view the 'about us' page, then that's ok, no redirect to portal.


Update: Problem Resolved

Well, through trial and error (I don't know php code that well), I've found the following works:

Code: Select all

if ($user->data['user_id'] == ANONYMOUS)
        {
            redirect(append_sid("{$phpbb_root_path}portal.$phpEx"));
        }
The code being placed in the .php file of each page one does not want guests to access.
Locked

Return to “board3 Portal 1.0.x - English Support”