Portal.php

Current Version: 2.0.2
Released: 2013-10-27
Forum rules
Before creating a new support thread, please take a look at the board3 Portal FAQ and use the search!
Many questions have already been answered.
computerhavok
Topic author
Active Member
Active Member
Posts: 1
Joined: 31. October 2014 10:51
phpBB.com User: computerhavok

Portal.php

Post by computerhavok » 31. October 2014 11:49

Your Portal Version: 2.0.2
Your phpBB Type: Standard phpBB3
MODs installed: Yes
Your knowledge: Basic Knowledge
Boardlink: http://twgs.afterhours-bbs.com/

PHP Version: 5.3
MySQL Version: MySQL 5.1.68-community

What have you done before the problem was there?
I installed AutoMod

What have you already tryed to solve the problem?
I did your Redirect to the portal after login / logout and that worked fine.

Description and Message
When I open a new browser window it still goes to index.php and not portal.php, what am I missing?

Thanks before hand.

User avatar
Kirk
Portal Professional
Portal Professional
Posts: 1432
Joined: 27. July 2010 18:02
phpBB.de User: Kirk

Re: Portal.php

Post by Kirk » 1. November 2014 18:46

Hi
Open: root/ucp.php
Find:

Code: Select all

    case 'login':
        if ($user->data['is_registered'])
        {
            redirect(append_sid("{$phpbb_root_path}index.$phpEx"));
        }

        login_box(request_var('redirect', "index.$phpEx"));
    break;

    case 'logout':
        if ($user->data['user_id'] != ANONYMOUS && isset($_GET['sid']) && !is_array($_GET['sid']) && $_GET['sid'] === $user->session_id)
        {
            $user->session_kill();
            $user->session_begin();
            $message = $user->lang['LOGOUT_REDIRECT'];
        }
        else
        {
            $message = ($user->data['user_id'] == ANONYMOUS) ? $user->lang['LOGOUT_REDIRECT'] : $user->lang['LOGOUT_FAILED'];
        }
        meta_refresh(3, append_sid("{$phpbb_root_path}index.$phpEx"));
Relace with:

Code: Select all

    case 'login':
        if ($user->data['is_registered'])
        {
            redirect(append_sid("{$phpbb_root_path}portal.$phpEx"));
        }

        login_box(request_var('redirect', "portal.$phpEx"));
    break;

    case 'logout':
        if ($user->data['user_id'] != ANONYMOUS && isset($_GET['sid']) && !is_array($_GET['sid']) && $_GET['sid'] === $user->session_id)
        {
            $user->session_kill();
            $user->session_begin();
            $message = $user->lang['LOGOUT_REDIRECT'];
        }
        else
        {
            $message = ($user->data['user_id'] == ANONYMOUS) ? $user->lang['LOGOUT_REDIRECT'] : $user->lang['LOGOUT_FAILED'];
        }
        meta_refresh(3, append_sid("{$phpbb_root_path}portal.$phpEx"));
Gruß Udo

User avatar
Marc
Dev
Dev
Posts: 2487
Joined: 17. July 2008 21:08
phpBB.de User: marc1706
phpBB.com User: Marc
Location: Clausthal-Zellerfeld / München

Re: Portal.php

Post by Marc » 2. November 2014 12:10

Moved to the correct forum.

HoodieWeather
Valued Contributor
Valued Contributor
Posts: 53
Joined: 10. December 2015 04:03

Re: Portal.php

Post by HoodieWeather » 23. January 2016 02:45

Are those codes so that if a user logs into the forum it spits them the portal instead of the forum if so thanks

cause i have a dummy account and I log in and it shoots me to the forum and not the portal itself and i'm trying to find a way to stop that. I want users to be sent to portal not the forum instead

User avatar
talonos
Portal Specialist
Portal Specialist
Posts: 220
Joined: 7. June 2009 15:12
phpBB.com User: talonos

Re: Portal.php

Post by talonos » 23. January 2016 14:37

yes they are but they are for the old version so these edits won't work in current or future versions.
Creating board3 website? check the sites out below for board3 compatible extensions
Talonos: Pretereo stormrage EU

HoodieWeather
Valued Contributor
Valued Contributor
Posts: 53
Joined: 10. December 2015 04:03

Re: Portal.php

Post by HoodieWeather » 26. January 2016 08:27

talonos wrote:yes they are but they are for the old version so these edits won't work in current or future versions.

I'm running 2.0.2

Return to “Board3 Portal 2.0.x - English Support”