View Single Post
  #1  
Old 07-02-2011, 06:38 AM
Chibi_Chicken Chibi_Chicken is offline
Niwatori Kami
 
Join Date: Jun 2011
Posts: 63
Gender: Unknown/Other
Credits: 5,050
Chibi_Chicken is on a distinguished road
Default phpbb integration

So I thought I would share some of my chicken scratching with you about getting a forum install with Mysidia.
Back when it was just Rusnak I was able to integrate the forums user logins, it has been a little trickier for me with the
updated scripts but I love me some google'n problem fixing. This is what I have so far.

looking at
http://www.phpbb.com/community/viewt...?f=46&t=719055
as the starting off point and looking in to
http://startrekguide.com/community/v...t=9456&start=0
lead me to this as a possible solution.

first I built a page in the root folder called phpbb.php
Code:
<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './phpbb3/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include("inc/functions.php");
include("inc/bbcode.php");

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
?>
Then I edited every adoptable page replacing the old includes to
include("phpbb3.php")
From their if I wanted to check if the user is logged on(from any of the adopt pages)
Code:
	if ($user->data['user_id'] == ANONYMOUS)
{
   echo = 'Please login!';
}

else
{
   echo = 'Thanks for logging in, ' . $user->data['username_clean'];
}
If I wanted to run that same code from a function I would need to just set the global variable $user.
That is what I have so far I am unsure if I just want a 'lite' integration where it just checks if the the user is logged in or more like the "phpBB3 Website Integration Framework."
I installed that to the adopt script and got the index page to load up but their would be a lot of editing involved to make it full work with Mysidia.
Reply With Quote