Page 1 of 1

Using Portal as index.php with a Twist

Posted: 23. November 2008 05:58
by GoldStarDad
Your Portal Version: 1.0.0RC3
Your phpBB Type: Standard phpBB3
MODs installed: No
Your knowledge: Beginner
Boardlink: http://http://www.goldstardads.org/members/community/

What have you done before the problem was there?


What have you already tryed to solve the problem?
I tried the fixes here viewtopic.php?f=10&t=350

Description and Message
I have the phpbb3.0 and Board3 Portal working like a fine Swiss watch including Gallery and live weather, awesome script, kudos to everyone involved. ALL of it is currently sitting in the /members/community/ folder

Here is my mission. I want to use a modified portal.php (with no News or board functions just a welcome block and a log in box, maybe my weather box, what ever but not much else) I want to call it index.php and place it in /members/

Then
When a guest logs in or completes registration they would be sent to the /members/community/which automatically is loading portal.php at this time (this would be the full Monty with newest post, Gallery links & newest pictures, everything.

BUT ~ I don't want anyone to be able to see anything on the members/community/ if they bypass login unless the session timer is still in play from a previous login.

Bassicly i am trying to use the phpbb & portal3 as a Members Only system. IS THIS POSSIBLE?

I tried to follow the directions from this thread viewtopic.php?f=10&t=350 but it didn't help

ANYONE???

Re: Using Portal as index.php with a Twist

Posted: 24. November 2008 22:38
by Maverick
Edit styles/provision/template/portal/portal_body.html

Enclose all the block "includes" e.g <!-- INCLUDE portal/block/leaders.html --> that you only want members to see with the lines:

<!-- IF S_USER_LOGGED_IN -->

<!-- ENDIF -->

example:
<!-- IF S_USER_LOGGED_IN -->
<!-- INCLUDE portal/block/leaders.html -->
<!-- ENDIF -->


If you want to display something for non-members only use the alternative script:

<!-- IF not S_USER_LOGGED_IN -->

<!-- ENDIF -->

So what you would have is a single page that does everything you wanted: showing the non-members the bits you want to see and the members the full-works. The log-in box of course already has this built in - it shows the log-in box if you're not logged in and your member information if you are. There is also an option in the ACP to only show the welcome message to non-members.