bitweaver
Wiki
wiki Home
List Pages
wiki Books
Orphan Pages
wiki Rankings
Photos
List Galleries
Forums
Browse forums
Files
List Galleries
Categories
List Categories
Sign In
Message Boards
»
07. Support - 3rd party apps
Newest
Oldest
Threaded
5
10
20
50
100
All
Messages
Havnt tested yet.
Post Reply
phpBB Edits
Havnt tested yet.
Posted:10 Nov 2004 (03:30 UTC)
Anonymous
Posted:10 Nov 2004 (03:32 UTC)
Southpaw
Joined: 10 Nov 2004
Posted:10 Nov 2004 (03:38 UTC)
spiderr
Joined: 08 Feb 2004
Posted:10 Nov 2004 (16:37 UTC)
Southpaw
Joined: 10 Nov 2004
Posted:13 Nov 2004 (01:18 UTC)
Post Reply
Page 1 of 1
1
Post
Title
Login
If you are already registered, please enter your login credentials.
Your Name
Anonymous Post
Content Format
Tiki Wiki Syntax
Allow HTML
{quote format_guid="bbcode" comment_id="7531" user="anonymous"}As far as I can tell, the only edits to phpBB to integrate it to bitweaver are from 2 files (and 1 additional file): [b:6f61f44984]common.php +tiki_setup_inc.php ./includes/sessions.php[/b:6f61f44984] [i:6f61f44984]Can someone verify please?[/i:6f61f44984] I am going to test [soon] phpBB 2.0.10 and the current CVS 2.1.x (So i'm adding this here for all to see... but more for my benefit as I'll probably lose this if I write this down elsewhere) Anyways... ____________________________________________________ [b:6f61f44984]common.php[/b:6f61f44984] find: [code:1:6f61f44984]$board_config = array(); $userdata = array(); $theme = array(); $images = array(); $lang = array(); $gen_simple_header = FALSE;[/code:1:6f61f44984] add under: [code:1:6f61f44984]// {{{ TIKI_MOD if( file_exists( $phpbb_root_path . 'config.'.$phpEx ) ) { include($phpbb_root_path . 'config.'.$phpEx); } if( !defined("PHPBB_INSTALLED") ) { header("Location: install/install.$phpEx"); exit; } require_once( $phpbb_root_path.'/../tiki_setup_inc.php' ); //phpBB is not as clean as tiki. errors only error_reporting ( E_ALL & ~E_NOTICE ); // }}} TIKI_MOD[/code:1:6f61f44984] ____________________________________________________ New file: [i:6f61f44984]tiki_setup_inc.php[/i:6f61f44984] [code:1:6f61f44984]<?php global $gTikiSystem; $gTikiSystem->registerPackage( 'phpBB', dirname( __FILE__ ).'/' ); if( $gTikiSystem->isPackageActive( 'phpbb' ) ) { $gTikiSystem->registerAppMenu( 'phpbb', 'Forums', PHPBB_PKG_URL.'index.php', 'tikipackage:phpbb/menu_phpbb.tpl' ); } ?>[/code:1:6f61f44984] ____________________________________________________ ./includes/sessions.php find: [code:1:6f61f44984] else { $sessiondata = array(); $session_id = ( isset($HTTP_GET_VARS['sid']) ) ? $HTTP_GET_VARS['sid'] : ''; $sessionmethod = SESSION_METHOD_GET; }[/code:1:6f61f44984] add under:[code:1:6f61f44984] // {{{ TIKI_MOD // we always force auto login $sessiondata['autologinid'] = TRUE; // }}} TIKI_MOD[/code:1:6f61f44984] find: [code:1:6f61f44984] // // Did the session exist in the DB? // if ( isset($userdata['user_id']) ) {[/code:1:6f61f44984] add under: [code:1:6f61f44984] // {{{ BEGIN TIKI_MOD check_tiki_user( $userdata ); // }}} END TIKI_MOD[/code:1:6f61f44984] find:[code:1:6f61f44984] setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure); setcookie($cookiename . '_sid', $session_id, 0, $cookiepath, $cookiedomain, $cookiesecure); } return $userdata; } } }[/code:1:6f61f44984] add under: [code:1:6f61f44984] // {{{ BEGIN TIKI_MOD check_tiki_user( $sessiondata ); // {{{ END TIKI_MOD[/code:1:6f61f44984] find: [code:1:6f61f44984] // // If we reach here then no (valid) session exists. So we'll create a new one, // using the cookie user_id if available to pull basic user prefs. // $user_id = ( isset($sessiondata['userid']) ) ? intval($sessiondata['userid']) : ANONYMOUS; if ( !($userdata = session_begin($user_id, $user_ip, $thispage_id, TRUE)) ) { message_die(CRITICAL_ERROR, 'Error creating user session', '', __LINE__, __FILE__, $sql); } return $userdata; }[/code:1:6f61f44984] add under: [code:1:6f61f44984]// {{{ BEGIN TIKI MOD function check_tiki_user( &$p_user_data ) { // We have a valid tiki user, however we do not have a phpBB user global $db, $gTikiSystem, $gTikiUser, $userlib, $HTTP_GET_VARS; if( empty($p_user_data['user_id']) || ($p_user_data['user_id'] == ANONYMOUS) || ( $gTikiUser->isValid() && $gTikiUser->mUserId != $p_user_data['user_id'] ) ) { if( $gTikiUser->isValid() ) { // // Try and pull the last time stored in a cookie, if it exists // $sql = "SELECT * FROM " . USERS_TABLE . " WHERE user_id = '".$gTikiUser->mUserId."'"; if ( !($result = $db->sql_query($sql)) ) { message_die(CRITICAL_ERROR, 'Could not obtain tiki user from phpBB user table', '', __LINE__, __FILE__, $sql); } $user_row = $db->sql_fetchrow($result); $md5 = ( $gTikiSystem->mPrefs['feature_clear_passwords'] == 'y' ); $phpbb_password = ( $md5 ? $gTikiUser->mInfo['password'] : md5( $gTikiUser->mInfo['password'] ) ); if( empty( $user_row['user_id'] ) ) { $sql = "INSERT INTO ". USERS_TABLE ." (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey) VALUES ( ".$gTikiUser->mInfo['user_id'].", ".$gTikiSystem->mDb->qstr( $gTikiUser->mInfo['login'], get_magic_quotes_gpc() ).", ".strtotime('now').", ".$gTikiSystem->mDb->qstr( $phpbb_password, get_magic_quotes_gpc() ).", '".$gTikiUser->mInfo['email']."', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, NULL, NULL, NULL, 0, 1, 0, 1, 0, 0, 1, 1, 0, 'd M Y h:i a', 'english', 1, ".(int)$gTikiUser->isAdmin().", 0, 1, NULL)"; if ( !($result = $db->sql_query($sql)) ) { message_die(CRITICAL_ERROR, 'Could not create tiki user for phpBB', '', __LINE__, __FILE__, $sql); } // nuke their existing session cause it stores anonymous_id (-1) initially $sql = "DELETE FROM " . SESSIONS_TABLE . " WHERE session_id = '".$p_user_data['session_id']."'"; if ( !$db->sql_query($sql) ) { message_die(CRITICAL_ERROR, 'Error clearing sessions table', '', __LINE__, __FILE__, $sql); } } else { // Has user data changed? if( ($user_row['user_email'] != $gTikiUser->mInfo['email']) || ($user_row['user_password'] != $phpbb_password) || ($user_row['username'] != $gTikiUser->mInfo['login']) ) { $sql = "UPDATE ". USERS_TABLE ." SET username=".$gTikiSystem->mDb->qstr( $gTikiUser->mInfo['login'], get_magic_quotes_gpc() ).", user_email = ".$gTikiSystem->mDb->qstr( $gTikiUser->mInfo['email'], get_magic_quotes_gpc() ).", user_password=".$gTikiSystem->mDb->qstr( $phpbb_password, get_magic_quotes_gpc() )." WHERE user_id = ".$user_row['user_id']; if ( !($result = $db->sql_query($sql)) ) { message_die(CRITICAL_ERROR, 'Could not create tiki user for phpBB', '', __LINE__, __FILE__, $sql); die; } } } $p_user_data['user_id'] = $gTikiUser->mUserId; $p_user_data['userid'] = $gTikiUser->mUserId; } } } // }}} END TIKI MOD[/code:1:6f61f44984] ____________________________________________________ That's all I could find... I'll keep you guys posted on my progress :){/quote}
Recent Page Changes
welcome to bitweaver.org
Bitweaver Overview
ReleaseTwo Schema Changelog 2006
PressReleaseOne
Spider's Web
Press Release Two
BitcommercePackage
InfiniBand vs Ethernet Performance
InfiniBand for Dummies
Show More…