Hello,
First time poster, while I do have experience in mysql and php, I am new to the message board thing.
I have develop a few webpages that hold a LOTR based game (it's a wargame).
What I would like to do is to use the message board login system to attribute what can and can't be seen on the board.
The fact is that I already did it but it was with another type of message board and I want my game to be able to work with this one.
The code use to look like this (it was called each time a page was accessed) :
//============================================ AUTHENTICATE WITH PHPBB CODE =====================
define('IN_PHPBB', true);
$phpbb_root_path = '../forum/';
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);
From there I was able to construct my sql with this variable $userdata['user_id'] to allow players to see only stuff that they are allowed to see.
Bassically I need to fetch the players board ID.
can anybody give me any suggestion on this?
Thank you
I've found a solution...
it was just a matter of loading the SSI.php
en using the context and user_info variable.
require("../SMF/SSI.php");
if ($context['user']['is_logged'] != 1)
{
exit("You do not seem to be logged. Please <a href='../SMF/index.php'>log in</a>");
}
$username = $user_info['name'];
I can't wait to see that LOTR wargame going.
Ciao