I have been trying to do the same thing but with no success. Basically, I am trying to access the S_USER_LOGGED_IN variable so that I can customize the links on my menu bar based on whether or not someone is logged into the message board. As background, I have the message board embedded within my main webpage using an iframe. I have posted the below code into the very top of one of my web pages and it isn't displaying any data. The page is just a plan .html page. Does it need to be a php? Any thoughts on why this isn't working???
<?php
define('IN_PHPBB', true);
$phpbb_root_path = '
http://s244682566.onlinehome.us/ExDelicti/phpBB3';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//
if($userdata['session_logged_in'])
{
echo('Hi ' . $userdata['username'] . '!');
}
else
{
echo('You are a guest');
}
?>