sebonpl Wysłany: Sob 23 Gru, 2006 |
|
|
##############################################################
## Nazwa Modyfikacji: Nazwa U?ytkownik lub E-mail przy logowaniu
## Autor Modyfikacji: Settafix < settafix@gamesn.pl >
## Opis Modyfikacji: Dzi?ki tej modyfikacji u?ytkownicy mog? si? logowa? przy pomocy swojego loginu lub adresu email kt?ry wpisali przy rejestracji.
##
## Trudno?? Wgrania: ?atwa
## Czas instalacj: 3 Minuty
## Pliki do edycji: 6
## login.php
## includes/page_header.php
## includes/functions.php
## language/lang_polish/lang_main.php
## templates/*.*index_body.tpl
## templates/*.*/admin/login_body.tpl
##############################################################
Wiadomo?? ukryta / Hidden messageAby zobaczy? wiadomo?? postaw piwo autorowi piwo.#
#-----[ OPEN ]------------------------------------------
#
login.php
#
#-----[ FIND ]------------------------------------------
#
$password = isset($HTTP_POST_VARS['password']) ? $HTTP_POST_VARS['password'] : '';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$email = isset($HTTP_POST_VARS['username']) ? phpbb_clean_email($HTTP_POST_VARS['username']) : '';
$password_select = md5($password);
#-----[ FIND ]------------------------------------------
#
WHERE username = '" . str_replace("\'", "''", $username) . "'";
#
#-----[ REPLACE WITH]------------------------------------------
#
WHERE user_password = '$password_select' AND username = '" . str_replace("\\'", "''", $username) . "' or user_email = '" . str_replace("\\'", "''", $email) . "'";
#
#-----[ OPEN ]------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]------------------------------------------
#
'L_USERNAME' => $lang['Username'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
'L_USERNAME_EMAIL' => $lang['Username_Email'],
#
#-----[ OPEN ]------------------------------------------
#
includes/includes/functions.php
#
#-----[ FIND ]------------------------------------------
#
//
// Pagination routine, generates
// page number sequence
//
#
#-----[ BEFORE, ADD ]------------------------------------------
#
// added for username and email login mod to properly format the email
function phpbb_clean_email($email)
{
$email = substr(htmlspecialchars(str_replace("\'", "'", trim($email))), 0, 255);
$email = phpbb_rtrim($email, "\\");
$email = str_replace("'", "\'", $email);
return $email;
}
#
#-----[ OPEN ]------------------------------------------
#
language/lang_polish/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
$lang['Username'] = 'U?ytkownik';
#
#-----[ BEFORE, ADD ]------------------------------------------
#
$lang['Username_Email'] = 'U?ytkownik lub Adres E-mail';
#
#-----[ OPEN ]------------------------------------------
#
templates/*.*/index_body.tpl
#-----[ FIND ]------------------------------------------
#
{L_USERNAME}
#
#-----[ REPLACE WITH ]------------------------------------------
#
{L_USERNAME_EMAIL}
#
#-----[ OPEN ]------------------------------------------
#
templates/*.*/login_body.tpl
#-----[ FIND ]------------------------------------------
#
{L_USERNAME}
#
#-----[ REPLACE WITH ]------------------------------------------
#
{L_USERNAME_EMAIL}
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM |
|