Monday, May 4, 2009

how can login in phpbb, forum with own created page

Suppose your site is
www.gradtrain.com
and your forum is www.gradtrain.com/forum
and if want login with your crated page
www.gradtrain.com/forum-login.php
then take this step
define('IN_PHPBB', true);
define('PHPBB_ROOT_PATH', './forum/');

$phpbb_root_path = 'forum/';

$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);
?>
/* Start Logout*/
if ($user->data['is_registered']){

echo("
data['session_id']."'>");
echo("");
echo("");
echo("
");
}
/*End Logout*/

/*Start Login Box*/
if (!$user->data['is_registered']){
echo("
");
echo(" Username:");
echo("
");
echo(" ");
echo("

");
echo(" Password:");
echo("
");
echo(" ");
echo("

");
echo("");
echo("");
//echo("");
echo("
");
}
/*End Login Box*/

?>

No comments:

Post a Comment