• Resolved Scofield

    (@scofield)


    Hello all, I have a little question.
    How to use phpBB 3 sessions in to wordpress site?

    Where I must put this code ? I need phpBB3 sessions on every WP page

    <?php
    define('IN_PHPBB', true);
    $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? 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();
    ?>

    Thanks ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Scofield

    (@scofield)

    Now I have added this to pluggable.php
    On top

    define('IN_PHPBB', true);
    $phpbb_root_path = '../forum/';    //Path to forum
    $phpEx = substr(strrchr(__FILE__, '.'), 1);
    include($phpbb_root_path . 'common.' . $phpEx);
    
    // Start session management
    $user->session_begin();
    $auth->acl($user->data);
    $user->setup();

    and of course phpBB funcion

    function phpBB() {
    global $phpbb_root_path, $phpEx, $user, $auth, $template, $cache, $db, $config;
    // Start session management
    //$user->session_begin();
    //$auth->acl($user->data);
    //$user->setup();
        if ($user->data['user_id'] == ANONYMOUS)
        {
           echo 'Please login!';
        }
        else
        {
           echo 'Thanks for logging in, ' . $user->data['username_clean'];
        }
    
    }

    And to my sidebar (template file) I add
    <?php echo phpBB();?>

    And now, when I am not logged in on the forum it display me on WP site
    Please login!
    But when I am logged in and then go to my WP site its automaticaly logged out me ??

    Why please? Thanks

    Thread Starter Scofield

    (@scofield)

    Bump
    Nobody knows how to add phpbb3 sessions to WP? :O

    Bump

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘phpBB 3 sessions – How to?’ is closed to new replies.