Die Redirection Suite besteht aus vielen Anleitungen, mich interessiert aber nur eine und zwar die folgende, welche dazu führen soll das man nach dem registrieren automatisch eingelogt wird:
##############################################################
## MOD Title: Redirect After Registration
## MOD Author: Thoul < tempshad@hotmail.com >
## MOD Description: Allows redirection on the registration confirmation page.
## MOD Version: 2.0.0
##
## Installation Level: Easy
## Installation Time: 2 Minutes
## Files To Edit: includes/usercp_register.php, login.php
## Included Files: n/a
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/downloads/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause
## malicious code to enter into your phpBB Forum. As such, phpBB will not offer
## support for MOD's not offered in our MOD-Database, located at:
## http://www.phpbb.com/mods/downloads/
##############################################################
## Author's Notes:
##
## This MOD allows you to redirect a user, to a page you specify, after they've
## registered. You have an option of allowing the user to be automatically logged in
## on that page also. (Don't confuse this phpBB's "Log me on automatically each
## visit" feature - this is a one time login.)
##
## There are three variables in the code to be added that you can change to modify
## how this mod behaves. They are found on these lines:
## $register_redirect = 'index.$phpEx';
## $rds_auto_login = TRUE;
## $rds_auto_each_login = 1;
##
## $register_redirect should be set to the url of the page to which the user will be
## redirected after registering. For example, if you want them to go to
## http://site.com/index.html, that line needs to read:
## $register_redirect = 'http://site.com/index.html';
##
## $rds_auto_login should be set to either TRUE or FALSE. If it is true and your
## board does not require account activation, then the user will automatically be
## logged in when sent to the page specified in $register_redirect (assuming that
## page is a phpBB enabled page). The registration confirmation page will not be
## displayed in this case. If $rds_auto_login is FALSE or your board does require
## account activation, then the user is redirected to the page specified in
## $register_redirect and the registration confirmation page will be displayed.
## Examples:
## $rds_auto_login = TRUE;
## $rds_auto_login = FALSE;
##
## $rds_auto_each_login should be set to either 0 or 1. If it is set to 1 (meaning
## TRUE), then the user will automatically be logged in each visit (just as if they
## had checked the box on the login page).
## Examples:
## $rds_auto_each_login = 0;
## $rds_auto_each_login = 1;
##
## (Special Notes: If you are familiar enough with phpBB, it's possible to add
## options to the registration form that will let the user choose if they want to
## be logged in automatically after registering ($rds_auto_login) or logged in
## automatically each visit ($rds_auto_each_login). I might add it to a future
## version of the mod as well, if someone wants the code for it.)
##
## This MOD is released under the GPL License.
## Intellectual Property is retained by the MOD Author(s) listed above.
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To
## This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_register.php
#
#-----[ FIND ]------------------------------------------
#
$message = $message . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');
#
#-----[ REPLACE WITH ]------------------------------------------
#
/* Original phpBB code - commented out for Redirect After Registration MOD
$message = $message . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');
*/
//
// MOD: Redirect After Registration
//
$register_redirect = 'index.$phpEx';
$rds_auto_login = TRUE;
$rds_auto_each_login = 1;
if ( $rds_auto_login && $board_config['require_activation'] == USER_ACTIVATION_NONE )
{
$login_str = '?username=' . urlencode($username) . '&password=' . urlencode($password_confirm) . '&login=Login';
if ( $rds_auto_each_login )
{
$login_str .= '&autologin=1';
}
$redirect_str = '&redirect=' . $register_redirect;
$header_location = ( @preg_match("/Microsoft|WebSTAR|Xitami/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: ";
header($header_location . append_sid("login.$phpEx" . $login_str . $redirect_str, true));
exit;
}
else
{
$message = $message . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid($register_redirect) . '">', '</a>');
$template->assign_vars(array(
"META" => '<meta http-equiv="refresh" content="5;url=' . append_sid($register_redirect) . '">')
);
}
//
// MOD: -END-
//
#
#-----[ OPEN ]------------------------------------------
#
login.php
#
#-----[ FIND ]------------------------------------------
#
$username = isset($HTTP_POST_VARS['username']) ? $HTTP_POST_VARS['username'] : '';
$password = isset($HTTP_POST_VARS['password']) ? $HTTP_POST_VARS['password'] : '';
#
#-----[ REPLACE WITH ]------------------------------------------
#
/* Original phpBB code - commented out for Redirect After Registration MOD
$username = isset($HTTP_POST_VARS['username']) ? $HTTP_POST_VARS['username'] : '';
$password = isset($HTTP_POST_VARS['password']) ? $HTTP_POST_VARS['password'] : '';
*/
//
// MOD: Redirect After Registration
//
$username = isset($HTTP_POST_VARS['username']) ? $HTTP_POST_VARS['username'] : (isset($HTTP_GET_VARS['username']) ? urldecode($HTTP_GET_VARS['username']) : '');
$password = isset($HTTP_POST_VARS['password']) ? $HTTP_POST_VARS['password'] : (isset($HTTP_GET_VARS['password']) ? urldecode($HTTP_GET_VARS['password']) : '');
//
// MOD: -END-
//
#
#-----[ FIND ]------------------------------------------
#
if( !empty($HTTP_POST_VARS['redirect']) )
{
header($header_location . append_sid($HTTP_POST_VARS['redirect'], true));
exit;
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
//
// MOD: Redirect After Registration
//
else if( !empty($HTTP_GET_VARS['redirect']) )
{
header($header_location . append_sid($HTTP_GET_VARS['redirect'], true));
exit;
}
//
// MOD: -END-
//
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Mein Problem mit meinem sauber phpBB 2.03 Testboard:
Wenn man sich registriert, dann wird man weitergeleitet ins nix also ERROR 404

Ich weis nicht woran das liegt.
Mein Problem ist allerdings auch das der eine Absatz in der login.php 3 mal existiert, ich meine das hier in der Anleitung:
#
#
#-----[ FIND ]------------------------------------------
#
if( !empty($HTTP_POST_VARS['redirect']) )
{
header($header_location . append_sid($HTTP_POST_VARS['redirect'], true));
exit;
}
Ich habe das gleich mit dem erstgefunden Absatz gearbeitet, weis aber nicht ob das der richtige ist...