www.skatekool.altervista.org
io uso questo codice :
<?php
define('IN_PHPBB', true);
$phpbb_root_path = './community/';//path del tuo phpBB
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
?>
questa parte implementa le sessioni di phpBB facendola partire,questo codice va messo prima di <html>
poi per il box login usa questo codice dove vuoi cosi un utente loggandosi dal sito si logga nel forum e viene riconosciuto anche nel sito e poi viene reindirizzato all'home page con la sessione di phpBB codice:
if( $userdata['session_logged_in'] )
{
echo "Benvenuto
";
echo "<center>".$userdata['username']."</center>
<ul>[*]<a href=\"http://www.skatekool.altervista.org/community/profile.php?mode=editprofile\">Profilo utente.</a>[*]<a href=\"http://www.skatekool.altervista.org/community/privmsg.php?folder=inbox\">Messaggi privati</a>[*]<a href=\"http://www.skatekool.altervista.org/community/login.php?logout=true&sid=$sid\">Log out</a>
[/list]";
}
else
{
echo "<form action=\"community/login.php\" method=\"post\">
<input value=\"../index.php\" name=\"redirect\" type=\"hidden\">
Username:
<input size=\"15\" name=\"username\" type=\"text\" class=\"post\">
Password:
<input size=\"15\" name=\"password\" type=\"password\" class=\"post\">
<input value=\"ON\" name=\"autologin\" type=\"hidden\">
<input value=\"Login\" name=\"login\" class=\"mainoption\" type=\"submit\"></form>
<a class=\"gensmall\" href=\"community/profile.php?mode=sendpassword\">password dimenticata?</a>
Non hai ancora un account?
<a href=\"http://www.skatekool.altervista.org/community/profile.php?mode=register\">clicca qui</a></span>
</span></p>\n";
}