Extraido de phpbb.com
Código: Seleccionar todo
##############################################################
## MOD Title: Fix For The Firefox "Remember Passwords" Problem
## MOD Author: T0ny < N/A > (Tony Smith) N/A
## MOD Description: Fix for firefox's Remember Passwords feature
## overwriting username and password on the
## 'User Administration' page
## MOD Version: 1.0.2
##
## Installation Level: Easy
## Installation Time: ~5 Minutes
## Files To Edit: 5
## admin/admin_ug_auth.php
## admin/admin_users.php
## templates/subSilver/admin/user_edit_body.tpl
## templates/subSilver/admin/user_select_body.tpl
## templates/subSilver/search_username.tpl
## Included Files: N/A
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes:
## Simply renames the 'username' field to
## 'user_name' and changes all relevant occurrences of
## $HTTP_POST_VARS['username'] to $HTTP_POST_VARS['user_name']
##
## Tested with phpbb v2.0.19 , Firefox 1.5 , IE 6.0SP2
##
##############################################################
## MOD History:
##
## 2006-01-29 - Version 1.0.0
## - initial release
##
## 2006-02-05 - version 1.0.1
## - fixed incorrect case in references to subSilver template
## - fixed bug causing 'Find A Username' to not work (search_username.tpl)
##
## 2006-02-08 - version 1.0.2
## - fixed faulty find/replace actions
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
admin/admin_users.php
#
#-----[ FIND ]---------------------------------------------------
#
if ( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) || isset($HTTP_GET_VARS[POST_USERS_URL]) || isset( $HTTP_POST_VARS[POST_USERS_URL]) ) )
#
#-----[ REPLACE WITH ]---------------------------------------------------
#
if ( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['user_name']) || isset($HTTP_GET_VARS[POST_USERS_URL]) || isset( $HTTP_POST_VARS[POST_USERS_URL]) ) )
#
#-----[ FIND ]---------------------------------------------------
#
$username = ( !empty($HTTP_POST_VARS['username']) ) ? phpbb_clean_username($HTTP_POST_VARS['username']) : '';
#
#-----[ REPLACE WITH ]---------------------------------------------------
#
$username = ( !empty($HTTP_POST_VARS['user_name']) ) ? phpbb_clean_username($HTTP_POST_VARS['user_name']) : '';
#
#-----[ FIND ]---------------------------------------------------
#
$this_userdata = get_userdata($HTTP_POST_VARS['username'], true);
#
#-----[ REPLACE WITH ]---------------------------------------------------
#
$this_userdata = get_userdata($HTTP_POST_VARS['user_name'], true);
#
#-----[ FIND ]---------------------------------------------------
#
$s_hidden_fields .= '<input type="hidden" name="username" value="' . str_replace("\"", """, $username) . '" />';
#
#-----[ REPLACE WITH ]---------------------------------------------------
#
$s_hidden_fields .= '<input type="hidden" name="user_name" value="' . str_replace("\"", """, $username) . '" />';
#
#-----[ OPEN ]------------------------------------------
#
admin/admin_ug_auth.php
#
#-----[ FIND ]---------------------------------------------------
#
else if ( ( $mode == 'user' && ( isset($HTTP_POST_VARS['username']) || $user_id ) ) || ( $mode == 'group' && $group_id ) )
#
#-----[ REPLACE WITH ]---------------------------------------------------
#
else if ( ( $mode == 'user' && ( isset($HTTP_POST_VARS['user_name']) || $user_id ) ) || ( $mode == 'group' && $group_id ) )
#
#-----[ FIND ]---------------------------------------------------
#
if ( isset($HTTP_POST_VARS['username']) )
#
#-----[ REPLACE WITH ]---------------------------------------------------
#
if ( isset($HTTP_POST_VARS['user_name']) )
#
#-----[ FIND ]---------------------------------------------------
#
$this_userdata = get_userdata($HTTP_POST_VARS['username'], true);
#
#-----[ REPLACE WITH ]---------------------------------------------------
#
$this_userdata = get_userdata($HTTP_POST_VARS['user_name'], true);
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/admin/user_edit_body.tpl
#
#-----[ FIND ]---------------------------------------------------
#
<input class="post" type="text" name="username" size="35" maxlength="40" value="{USERNAME}" />
#
#-----[ REPLACE WITH ]---------------------------------------------------
#
<input class="post" type="text" name="user_name" size="35" maxlength="40" value="{USERNAME}" />
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/admin/user_select_body.tpl
#
#-----[ FIND ]---------------------------------------------------
#
<td class="row1" align="center"><input type="text" class="post" name="username" maxlength="50" size="20" /> <input type="hidden" name="mode" value="edit" />{S_HIDDEN_FIELDS}<input type="submit" name="submituser" value="{L_LOOK_UP}" class="mainoption" /> <input type="submit" name="usersubmit" value="{L_FIND_USERNAME}" class="liteoption" onClick="window.open('{U_SEARCH_USER}', '_phpbbsearch', 'HEIGHT=250,resizable=yes,WIDTH=400');return false;" /></td>
#
#-----[ REPLACE WITH ]---------------------------------------------------
#
<td class="row1" align="center"><input type="text" class="post" name="user_name" maxlength="50" size="20" /> <input type="hidden" name="mode" value="edit" />{S_HIDDEN_FIELDS}<input type="submit" name="submituser" value="{L_LOOK_UP}" class="mainoption" /> <input type="submit" name="usersubmit" value="{L_FIND_USERNAME}" class="liteoption" onClick="window.open('{U_SEARCH_USER}', '_phpbbsearch', 'HEIGHT=250,resizable=yes,WIDTH=400');return false;" /></td>
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/search_username.tpl
#
#-----[ FIND ]---------------------------------------------------
#
opener.document.forms['post'].username.value = selected_username;
#
#-----[ REPLACE WITH ]---------------------------------------------------
#
if (opener.document.forms['post'].user_name)
{
opener.document.forms['post'].user_name.value = selected_username;
}
else
{
opener.document.forms['post'].username.value = selected_username;
}
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Un Saludo