Username:
Password:
Search for Plugins: Advanced
Please Sign in, Register or Resend Activation Email

Forums

  e107 Coders.org :: Forums :: E107 Plugins :: Current Plugin Projects
 
<< Previous thread | Next thread >>  
e107 <-> phpBB Integration...     Go to page   <<        >>        
Author Post
twisterbyte
Mon Jul 26 2004, 04:03PM
Registered Member #10455
Joined: Sun Jun 06 2004, 01:45PM
Location:
Posts: 2
no login intergration means that you must register yourself two times?

Sorry for the bad english
Back to top
CarNagE
Tue Jul 27 2004, 07:44AM
Registered Member #11606
Joined: Mon Jun 21 2004, 07:19PM
Location:
Posts: 28
yes
Back to top
Zaphod
Wed Jul 28 2004, 05:46AM
Registered Member #820
Joined: Wed Sep 10 2003, 10:33PM
Location: Sydney, Australia
Posts: 487
Login Integration can be achieved by using the following function, i have it working inside a different login script I wrote for one of my sites.

/*
 * PHPBB_Login allows you to integrate your own login system
 * with phpBB. Meaning that you can have one login valid across
 * both your website and phpBB.
 *
 * To take full advantage of this PHPBB_Login class you just
 * need to modify your own login system to include a call
 * to the relevant methods in here.
 *
 * This system is reliant on the website username being exactly
 * the same as the phpBB username. To insure this, I recommend
 * disabling the ability to change usernames from within the 
 * phpBB admin control panel.
 *
 * Distributed under the LGPL license:
 * http://www.gnu.org/licenses/lgpl.html
 *
 * Duncan Gough
 * 3rdSense.com
 *
 * Home  http://www.suttree.com
 * Work  http://www.3rdsense.com
 * Play! http://www.playaholics.com
 */

class PHPBB_Login {

    function PHPBB_Login() {
    }

    function login( $phpbb_user_id ) {
        global $db, $board_config;
        global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;
    
        // Setup the phpbb environment and then
        // run through the phpbb login process

        // You may need to change the following line to reflect
        // your phpBB installation.
        require_once( $_SERVER['DOCUMENT_ROOT']."/forum/config.php" );
    
        define('IN_PHPBB',true);

        // You may need to change the following line to reflect
        // your phpBB installation.
        $_SERVER['DOCUMENT_ROOT']."/forum/";   
     
        require_once( $phpbb_root_path . "extension.inc" );
        require_once( $phpbb_root_path . "common.php" );

        return session_begin( $phpbb_user_id, $user_ip, PAGE_INDEX, FALSE, TRUE );
    
    }

    function logout( $session_id, $phpbb_user_id ) {
        global $db, $lang, $board_config;
        global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;
    
        // Setup the phpbb environment and then
        // run through the phpbb login process

        // You may need to change the following line to reflect
        // your phpBB installation.
        require_once( $_SERVER['DOCUMENT_ROOT']."/forum/config.php" );
    
        define('IN_PHPBB',true);
        
        // You may need to change the following line to reflect
        // your phpBB installation.
        $phpbb_root_path = $_SERVER['DOCUMENT_ROOT']."/forum/";

        require_once( $phpbb_root_path . "extension.inc" );
        require_once( $phpbb_root_path . "common.php" );

        session_end( $session_id, $phpbb_user_id );
    
        // session_end doesn't seem to get rid of these cookies,
        // so we'll do it here just in to make certain.
        setcookie( $board_config[ "cookie_name" ] . "_sid", "", time() - 3600, " " );
        setcookie( $board_config[ "cookie_name" ] . "_mysql", "", time() - 3600, " " );

    }

}


Login Example


$phpbb = new PHPBB_Login();
$phpbb->login( $user_ID );


$user_ID would be the user ID number for phpbb

Obviously some tweaking on the e107 side will need to be done to make sure your user ID from phpbb is recorded in your e107 user table, and members would need to be signed up both on e107 and your phpbb
Back to top
Website
twisterbyte
Wed Jul 28 2004, 02:52PM
Registered Member #10455
Joined: Sun Jun 06 2004, 01:45PM
Location:
Posts: 2
ok i dont know what you mean because i can't speak english and i can't progamm. It is possible? and when come the plugin?
Back to top
CarNagE
Thu Jul 29 2004, 02:29PM
Registered Member #11606
Joined: Mon Jun 21 2004, 07:19PM
Location:
Posts: 28
as soon as possible i presume streaky is working on it right now. I hope we gone see it soon.
Back to top
TinEastwood
Sun Aug 01 2004, 01:49PM
Registered Member #13945
Joined: Sun Aug 01 2004, 01:17PM
Location:
Posts: 1
I`ll hope you get this to work - Only reason that I don' t use e107 - was the missing intergation with my phpbb forums
Back to top
Zaphod
Mon Aug 02 2004, 06:44AM
Registered Member #820
Joined: Wed Sep 10 2003, 10:33PM
Location: Sydney, Australia
Posts: 487
I have integrated using another script but the bottom line is your site is going to be slllloooooooowwww with phpbb and e107. E107 is lsow itslef couple that with phpbb and not only are you going to have speed issues but bandwidth problems too.

The above code I posted works a treat with login integration its just sharing accross the login names and ID's
Back to top
Website
BalooDK
Fri Aug 06 2004, 02:51PM

Registered Member #9040
Joined: Tue May 11 2004, 07:42PM
Location: Denmark
Posts: 46
I got this when i made a post in the forum:

Warning: mysql_query(): 12 is not a valid MySQL-Link resource in /home/streakyl/public_html/e107_plugins/phpBB2/db/mysql4.php on line 118

Warning: mysql_error(): 12 is not a valid MySQL-Link resource in /home/streakyl/public_html/e107_plugins/phpBB2/db/mysql4.php on line 330

Warning: mysql_errno(): 12 is not a valid MySQL-Link resource in /home/streakyl/public_html/e107_plugins/phpBB2/db/mysql4.php on line 331
phpBB : Critical Error

Error doing DB query userdata row fetch

DEBUG MODE

SELECT u.*, s.* FROM phpbb_sessions s, phpbb_users u WHERE s.session_id = '287477259974d266965f4e734c905250' AND u.user_id = s.session_user_id

Line : 235
File : /home/streakyl/public_html/e107_plugins/phpBB2/includes/sessions.php
Back to top
Website
DeadShot
Tue Sep 14 2004, 05:13PM
Registered Member #15672
Joined: Tue Sep 14 2004, 04:56PM
Location:
Posts: 1
Any luck lately streaky? I'm also one of the peps that would like a direct input from e107 to phpbb.

Feel free to see our current setup at [link]
Back to top
Zaphod
Mon Sep 27 2004, 12:48AM
Registered Member #820
Joined: Wed Sep 10 2003, 10:33PM
Location: Sydney, Australia
Posts: 487
In the end personally i decide to just write a new CMS around phpbb rather try to integrate other wise it becomes too bulky

see it at [link]
Back to top
Website
Go to page   <<        >>   

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System
Render time: 0.6643 sec, 0.1507 of that for queries. DB queries: 49.