Page 2 of 2

Simple portal outside

Posted: 08 Dec 2011, 11:07
by Stoker
Then you need to take a look at the code and see how that mod uses sessions. Or ask how to add a custom page at the phpbb-seo support forums.
An let me know the solution if other people ask ;)

Simple portal outside

Posted: 08 Dec 2011, 11:38
by Tigerman75
Yes ,Thanks very mucht Stoker :)
Edit:
Stoker ,I did a test by turning off the SEO mods, the problem remains :?

Simple portal outside

Posted: 28 Dec 2012, 23:47
by Tigerman75
Triass wrote:I am Have Mods Seo ultimate url running
Solved.
I added this code:

Open portal.php:
Search:

Code: Select all

<?php
define('IN_PHPBB', true);
$phpbb_root_path = './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
 
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
After add:

Code: Select all

if($user->data['is_registered'])
{
    //User is already logged in
}
else
{
    $username = request_var('username', '', true);
    $password = request_var('password', '', true);
    $autologin = (!empty($_POST['autologin'])) ? true : false;

    $result = $auth->login($username, $password, $autologin);

    if ($result['status'] == LOGIN_SUCCESS)
    {
        //User was successfully logged into phpBB
        $redirect = request_var('redirect', "{$phpbb_root_path}index.$phpEx");

        // append/replace SID
        $redirect = reapply_sid($redirect);

        meta_refresh(0, $redirect);
        trigger_error('You have been successfully logged in');
    }
    else
    {
        //User's login failed
    }
}