Mainsite - custom built by me - not wp, and not phpbb - mysite.com
Subfolder - /blog/ (wordpres 4.9.4)
Subfolder - /forum/ (phpbb 3.0.14 - the last release of 3.0)
On the main site I want to do the following;
1) Member's only Menu - so if you log into the forum you are considered a member. I use this on other pages (test subfolder within mysite.com), and it works great.
For example,
- I check to see if they are registered - if so, I show them the list of events we have coming up.
I check to see if the user is an Admin and if so, I give them access to create an event (php / mysql / etc...)
3) I decided to create the MEMBERS ONLY (those registered in the Forum) menu. I thought it would be simple following the recommendations from teh PHPBB board.
Code: Select all
define('IN_PHPBB', true);
$php_root_pat = 'forum/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
$user_name = $user->data['username'];
// allow access if the user is 'actually' registered - avoid the anonimous user.
if($user->data['is_registered']){
// echo 'logged in - you may do stuff here'
$allowed = TRUE;
}
else{
//echo "not logged in!";
$allowed = FALSE;
}
If I add this code,
Code: Select all
<?php require_once($_SERVER['DOCUMENT_ROOT'] . '/ezine/wp-load.php');?>
The same is true if I remove the PHPBB code, the page works great. I put it in, it breaks again.
I think - I'm not 100% certain, but I do think - that my root cause analysis is within the operation of the wp-load.php page; but I can't figure out what the conflict is - meaning: I'm not that good that I can figure this out.
I can simply let the pages with the code above reject the user and send them to a log in page; but I would prefer to make the menu MEMBERS ONLY show up when the members are logged in.
Does anyone know what the conflict is; and how I may resolve it (other than don't load wp-load.php)?