Hello guys, i need your help on something if you can help.
I'm trying to do something and i cannot really make it.
I want a user when he is coming to my phpBB without first registering through my page, not to be able to register to the forums. So when he tries to register ot the forum i want him to be redirected to my main registration page and then follow instunctions.
I have done something like this to "phpBB2/includes/usercp_register.php"
function show_coppa()
{
global $userdata, $template, $lang, $phpbb_root_path, $phpEx, $username, $email, $password;
$template->set_filenames(array(
'body' => 'agreement.tpl')
);
if ($username == "") {
//echo("<a href='http://www.soccerboards.com/register.php'>Click Here to Start at First
//Page of Registration</a><br><br><br><br><br>");
$refresh = "<META http-equiv='refresh' content='0;URL=
<!-- m --><a class="postlink" href="http://www.soccerboards.com/proceed.php'">http://www.soccerboards.com/proceed.php'</a><!-- m -->>";
echo($refresh);
}
else
{
$template->assign_vars(array(
'REGISTRATION' => $lang['Registration'],
'AGREEMENT' => $lang['Reg_agreement'],
"AGREE_OVER_13" => $lang['Agree_over_13'],
"AGREE_UNDER_13" => $lang['Agree_under_13'],
'DO_NOT_AGREE' => $lang['Agree_not'],
"U_AGREE_OVER13" => "profile.$phpEx?username=$username&email=$email&new_password=$password&password_confirm=$password&mode=register&agreed=true&sid=" . $userdata['session_id'],
"U_AGREE_UNDER13" => "profile.$phpEx?
How can i make it so that when the $username variable is not set, to redirect me straight to proceed.php without first loading (even for 1 second) the forum page?you need to check for a cookie or session.
set either somewhere but where is the question.I am tring a simlar thing atm. I think what you would be best off doing is combining the two sites, and using only one registration. I do see the point in having user detais stored in two places?
or you could possible asign a flag in the web site user account to allow sign up on phpbb, and code a confirm function into the phpbb code before start of phpbb code.
So it would be like this
/* Your Function to confirm user flag is cool for registraiton, or you post it in a cookie, DO NOT USE SEND WITH GET. This way is not very sercure, and I suggest a differnt approcah, like the generation of a random key, or an email conformation link type system. Your choice and I hope this help
*/
function show_coppa()
{
global $userdata, $template, $lang, $phpbb_root_path, $phpEx, $username, $email, $password;
$template->set_filenames(array(
'body' => 'agreement.tpl')
);
if ($username == "") {
//echo("<a href='http://www.soccerboards.com/register.php'>Click Here to Start at First
//Page of Registration</a><br><br><br><br><br>");
$refresh = "<META http-equiv='refresh' content='0;URL=
<a href=http://www.htmlforums.com/archive/index.php/"http://www.soccerboards.com/proceed.php" target="_blank">http://www.soccerboards.com/proceed.php</a>'>";
echo($refresh);
}
else
{
$template->assign_vars(array(
'REGISTRATION' => $lang['Registration'],
'AGREEMENT' => $lang['Reg_agreement'],
"AGREE_OVER_13" => $lang['Agree_over_13'],
"AGREE_UNDER_13" => $lang['Agree_under_13'],
'DO_NOT_AGREE' => $lang['Agree_not'],
"U_AGREE_OVER13" => "profile.$phpEx?username=$username&email=$email&new_password=$password&password_confirm=$password&mode=register&agreed=true&sid=" . $userdata['session_id'],
"U_AGREE_UNDER13" => "profile.$phpEx?
I'm trying to do something and i cannot really make it.
I want a user when he is coming to my phpBB without first registering through my page, not to be able to register to the forums. So when he tries to register ot the forum i want him to be redirected to my main registration page and then follow instunctions.
I have done something like this to "phpBB2/includes/usercp_register.php"
function show_coppa()
{
global $userdata, $template, $lang, $phpbb_root_path, $phpEx, $username, $email, $password;
$template->set_filenames(array(
'body' => 'agreement.tpl')
);
if ($username == "") {
//echo("<a href='http://www.soccerboards.com/register.php'>Click Here to Start at First
//Page of Registration</a><br><br><br><br><br>");
$refresh = "<META http-equiv='refresh' content='0;URL=
<!-- m --><a class="postlink" href="http://www.soccerboards.com/proceed.php'">http://www.soccerboards.com/proceed.php'</a><!-- m -->>";
echo($refresh);
}
else
{
$template->assign_vars(array(
'REGISTRATION' => $lang['Registration'],
'AGREEMENT' => $lang['Reg_agreement'],
"AGREE_OVER_13" => $lang['Agree_over_13'],
"AGREE_UNDER_13" => $lang['Agree_under_13'],
'DO_NOT_AGREE' => $lang['Agree_not'],
"U_AGREE_OVER13" => "profile.$phpEx?username=$username&email=$email&new_password=$password&password_confirm=$password&mode=register&agreed=true&sid=" . $userdata['session_id'],
"U_AGREE_UNDER13" => "profile.$phpEx?
How can i make it so that when the $username variable is not set, to redirect me straight to proceed.php without first loading (even for 1 second) the forum page?you need to check for a cookie or session.
set either somewhere but where is the question.I am tring a simlar thing atm. I think what you would be best off doing is combining the two sites, and using only one registration. I do see the point in having user detais stored in two places?
or you could possible asign a flag in the web site user account to allow sign up on phpbb, and code a confirm function into the phpbb code before start of phpbb code.
So it would be like this
/* Your Function to confirm user flag is cool for registraiton, or you post it in a cookie, DO NOT USE SEND WITH GET. This way is not very sercure, and I suggest a differnt approcah, like the generation of a random key, or an email conformation link type system. Your choice and I hope this help
*/
function show_coppa()
{
global $userdata, $template, $lang, $phpbb_root_path, $phpEx, $username, $email, $password;
$template->set_filenames(array(
'body' => 'agreement.tpl')
);
if ($username == "") {
//echo("<a href='http://www.soccerboards.com/register.php'>Click Here to Start at First
//Page of Registration</a><br><br><br><br><br>");
$refresh = "<META http-equiv='refresh' content='0;URL=
<a href=http://www.htmlforums.com/archive/index.php/"http://www.soccerboards.com/proceed.php" target="_blank">http://www.soccerboards.com/proceed.php</a>'>";
echo($refresh);
}
else
{
$template->assign_vars(array(
'REGISTRATION' => $lang['Registration'],
'AGREEMENT' => $lang['Reg_agreement'],
"AGREE_OVER_13" => $lang['Agree_over_13'],
"AGREE_UNDER_13" => $lang['Agree_under_13'],
'DO_NOT_AGREE' => $lang['Agree_not'],
"U_AGREE_OVER13" => "profile.$phpEx?username=$username&email=$email&new_password=$password&password_confirm=$password&mode=register&agreed=true&sid=" . $userdata['session_id'],
"U_AGREE_UNDER13" => "profile.$phpEx?