subSilver2 style issue - Firefox/Opera "Remember Passwords"

For support and discussion related to templates, themes, and imagesets in phpBB 3.0.
Get Involved
Locked
User avatar
Linda Carter
Registered User
Posts: 514
Joined: Fri Feb 15, 2008 6:45 am

subSilver2 style issue - Firefox/Opera "Remember Passwords"

Post by Linda Carter »

I have posted this issue on the Bug tracker and that was the answer given:
A developer has reviewed your report and determined that you would be better assisted in the support forum. The problem you are experiencing may be related to a specific server configuration/setting, or the ticket may not have been sufficiently researched. Please search the board for your problem and, if necessary, start a new topic in the support forum with a link to your report. Support team members are able to re-open reports if the issue is in fact a bug. If you have additional information about the issue, please reply to the report.
I am going to explain the problem here, and maybe someone can listen. :)

I have tested the subSilver 2 style on phpBB 3.0.2 and the default proSilver. The proSilver is fine, but the subSilver2 template is having exactly the problem described below. And I was not able to solve it.

Can someone please check this out? I have used Firefox 2.0.0.16 and this password thing is happening only on subSilver. It is not happening on proSilver. The subSilver2 style was taken here on phpBB.com. :ugeek:

When I go to user CP and try to change the email from my account, Firefox always ask me if I want to change my current stored password for that user logged.

Take a look, this was the fix made for the subSilver 2 template from phpBB 2. I don't need to tell you that phpBB 3 styles are completely different, so the changes will not fit:

EDIT: I am having the same issue on Firefox 3.0.1. :cry:

EDIT 2: Internet Explorer 6.0 (SP1) was tested, and after saving/storing the password, showed no errors while I was using the subSilver template.

This issue is only related to the Mozilla and Opera browsers, I can see the point of the Bug tracker developer. The way these browsers are storing passwords is different, so is not a bug by definition on the phpBB style.

Nonetheless, this is my suggestion, if you can fix this thing... :)

Code: Select all

##############################################################
## 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.2.2
##
## Installation Level: Easy
## Installation Time: ~5 Minutes
## Files To Edit: 4
##					admin/admin_ug_auth.php
##					admin/admin_users.php
##					templates/subSilver/admin/user_edit_body.tpl
##					templates/subSilver/search_username.tpl
## Included Files: N/A
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
#############################################################
## Author Notes:
##		Renames the 'username' field to 'user_name' and the
##		'password' field to 'pass_word' while still providing the
##		$HTTP_POST_VARS['username'] & $HTTP_POST_VARS['password']
##		array members for compatibility with other MODs
##
##		Tested with phpbb v2.0.19 , Firefox 1.5.0.1 , IE 6.0SP2
##					Firefox 2.0
##
##############################################################
## 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
##
##	2006-02-10 - version 1.1.0 (BETA)
##		- beta fix for incompatability with other MODs that modify the user admin functions
##
##	2006-02-11 - version 1.1.1 (BETA)
##		- removed 'templates/subSilver/admin/user_select_body.tpl' changes (no longer needed)
##		- made edit to 'templates/subSilver/admin/user_edit_body.tpl' a more specific IN-LINE FIND
##
##	2006-02-13 - version 1.2.0
##		- no functionality changes from 1.1.1 just changing the version number to indicate it's no longer beta
##
##	2006-03-28 - version 1.2.1
##		- fixed 'not saving changes to user account' bug when using PHP5 with 'register_long_arrays' set to OFF
##
##	2006-11-05 - version 1.2.2
##		- updated to fix newer incarnation of bug in firefox 2
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ OPEN ]------------------------------------------------
#

admin/admin_users.php

#
#-----[ FIND ]------------------------------------------------
#

require('./pagestart.' . $phpEx);

#
#-----[ AFTER, ADD ]------------------------------------------
#

if ( ( isset($HTTP_POST_VARS['user_name']) ) && ( !isset($HTTP_POST_VARS['username']) ) )
{
	$HTTP_POST_VARS['username'] = $HTTP_POST_VARS['user_name'];
}

if ( ( isset($HTTP_POST_VARS['pass_word']) ) && ( !isset($HTTP_POST_VARS['password']) ) )
{
	$HTTP_POST_VARS['password'] = $HTTP_POST_VARS['pass_word'];
}

#
#-----[ OPEN ]------------------------------------------------
#

admin/admin_ug_auth.php

#
#-----[ FIND ]------------------------------------------------
#

require('./pagestart.' . $phpEx);

#
#-----[ AFTER, ADD ]------------------------------------------
#

if ( ( isset($HTTP_POST_VARS['user_name']) ) && ( !isset($HTTP_POST_VARS['username']) ) )
{
	$HTTP_POST_VARS['username'] = $HTTP_POST_VARS['user_name'];
}

if ( ( isset($HTTP_POST_VARS['pass_word']) ) && ( !isset($HTTP_POST_VARS['password']) ) )
{
	$HTTP_POST_VARS['password'] = $HTTP_POST_VARS['pass_word'];
}

#
#-----[ OPEN ]------------------------------------------------
#

templates/subSilver/admin/user_edit_body.tpl

#
#-----[ FIND ]------------------------------------------------
#

name="username"

#
#-----[ IN-LINE FIND ]----------------------------------------
#

name="username"

#
#-----[ IN-LINE REPLACE WITH ]--------------------------------
#

name="user_name"

#
#-----[ FIND ]------------------------------------------------
#

name="password"

#
#-----[ IN-LINE FIND ]----------------------------------------
#

name="password"

#
#-----[ IN-LINE REPLACE WITH ]--------------------------------
#

name="pass_word"

#
#-----[ 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
"Whoever has not known himself has known nothing. But whoever has known himself has simultaneously achieved knowledge about the depth of all things."
User avatar
Phil
Former Team Member
Posts: 10403
Joined: Sat Nov 25, 2006 4:11 am
Name: Phil Crumm
Contact:

Re: subSilver2 style issue - Firefox/Opera "Remember Passwords"

Post by Phil »

As per the responses in the bug report you opened, this is an issue with how Firefox (particularly Firefox 3) handles password saving. There is nothing that can be done from the phpBB side of things.
Moving on, with the wind. | My Corner of the Web
User avatar
Linda Carter
Registered User
Posts: 514
Joined: Fri Feb 15, 2008 6:45 am

Re: subSilver2 style issue - Firefox/Opera "Remember Passwords"

Post by Linda Carter »

iWisdom wrote:As per the responses in the bug report you opened, this is an issue with how Firefox (particularly Firefox 3) handles password saving. There is nothing that can be done from the phpBB side of things.
Wisdom, I have tested:

Firefox 2.0.0.16
Firefox 3.0.1
Opera 9.26


All those browsers are using the same password manager, and they all have this "issue". You are missing my point - it's only affecting the subSilver2 style. So if you use the default proSilver, you won't be affected at all while changing your data on User CP (phpBB 3). :geek:

I told you that this issue was also affecting phpBB 2. But one user was capable of developing a "fix" for the subSilver template. As you can see on the first post of this thread, after doing all the changes of that MOD, the subSilver template (from phpBB 2) was corrected.

The most logical explanation is that the subSilver 2 template (from phpBB 3) was built using the source-code from the old one, without the "patch" applied. If you are not satisfied, I will show you a second fix (from another author). It was taken from here. :)

Code: Select all

############################################################## 
## MOD Title: Fix username and password for FireFox/Netscape browser
## MOD Author: RedFoxy < redfoxy@redfoxy.it > (Massimo Ciccio') http://www.redfoxy.it/
## MOD Description: That mod fix an annoy function of FireFox and NetScape compatible browser.
##		    When you go to edit a user profile, the username and the password in the form are
##		    changed on your username and password saved in browser cache.
##		    with that mod you can fix that.
##
## MOD Version: 1.0.0
##
## Installation Level: easy 
## Installation Time: 1 Minute
## Files To Edit:
##		templates/subSilver/admin/user_edit_body.tpl
##
## Author Notes: 
## 
## This MOD has been tested on phpBB 2.0.20, Categories Hierarchy v 2.1.4 and easyMod 0.3.0,
## but I think that is compatible with all phpBB 2.0.x version.
##
##
############## 
#
#-----[ OPEN ]------------------------------------------------
#
templates/subSilver/admin/user_edit_body.tpl
#
#-----[ FIND ]------------------------------------------------
#
<h1>{L_USER_TITLE}</h1>
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
<SCRIPT language="JavaScript">
<!--
//-- mod : Fix username and password v1.0.0 - 05x100 ----------------------------------------------
//-- add
function fix_fields()
{
        var uid_fix;
        var pwd_fix;

        document.getElementById('user_form').username.value = "{USERNAME}";
        document.getElementById('user_form').password.value = "";

        uid_fix = document.getElementById('user_form').username_fix.value;
        pwd_fix = document.getElementById('user_form').password_fix.value;

        if(uid_fix != "{USERNAME}")
        {
                document.getElementById('user_form').username.value = uid_fix;
        }

        if(pwd_fix != '')
        {
                document.getElementById('user_form').password.value = pwd_fix;
        }
}
//-- fin mod : Fix username and password v1.0.0 - 05x100 ------------------------------------------
-->
</SCRIPT>
#
#-----[ FIND ]------------------------------------------------
#
<form
#
#-----[ IN-LINE FIND ]--------------------------------------------------
#
<form
#
#-----[ IN-LINE AFTER, ADD ]--------------------------------------------
#
 id="user_form"
#
#-----[ FIND ]------------------------------------------------
#
type="text" name="username"
#
#-----[ IN-LINE FIND ]--------------------------------------------------
#
name="username
#
#-----[ IN-LINE AFTER, ADD ]--------------------------------------------
#
_fix
#
#-----[ FIND ]------------------------------------------------
#
type="password" name="password"
#
#-----[ IN-LINE FIND ]--------------------------------------------------
#
name="password
#
#-----[ IN-LINE AFTER, ADD ]--------------------------------------------
#
_fix
#
#-----[ FIND ]------------------------------------------------
#
{S_HIDDEN_FIELDS}
#
#-----[ AFTER, ADD ]-----------------------------------------
#
		<input type="hidden" name="username" value="{USERNAME}" />
		<input type="hidden" name="password" value="" />
#
#-----[ FIND ]------------------------------------------------
#
<input type="submit"
#
#-----[ IN-LINE FIND ]--------------------------------------------------
#
type="submit"
#
#-----[ IN-LINE AFTER, ADD ]--------------------------------------------
#
 onclick="fix_fields();"
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------------------
#
# EoM
"Whoever has not known himself has known nothing. But whoever has known himself has simultaneously achieved knowledge about the depth of all things."
User avatar
Phil
Former Team Member
Posts: 10403
Joined: Sat Nov 25, 2006 4:11 am
Name: Phil Crumm
Contact:

Re: subSilver2 style issue - Firefox/Opera "Remember Passwords"

Post by Phil »

This simply renames the fields. In Firefox 3, that won't solve the issue.
Moving on, with the wind. | My Corner of the Web
Locked

Return to “[3.0.x] Styles Support & Discussion”