MyBB Community Forums

Full Version: How to modify look of login page display ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How to modify login 'page' display (scrnshot attached).

Have checked out various templates etc (header_welcomeblock_guest, index_loginform, member.php, etc) but not able to find template (or file) to modify.

Suggestions on, if possible, where to look for template etc ?
Try header_welcomeblock_guest again, I think it must be there.
Edit: It starts w/ <span id="quick_login"> , which I don't see in the CSS styles.

Do you have your own VPS or server? (Never mind)
Enter in PuTTY:
grep "quick_login" /var/www/html/sample.com/forum/jscripts

Output =
/var/www/html/sample.com/forum/jscripts/general.js:         if($("quick_login"))
/var/www/html/sample.com/forum/jscripts/general.js:                     name: "quick_login",
/var/www/html/sample.com/forum/jscripts/general.js:                     id: "quick_login_username",
/var/www/html/sample.com/forum/jscripts/general.js:                     id: "quick_login_password",
/var/www/html/sample.com/forum/jscripts/general.js:                     id: "quick_login_remember",
/var/www/html/sample.com/forum/jscripts/general.js:                 span.innerHTML += "<label for=\"quick_login_remember\"> "+lang.remember_me+"</label>";
/var/www/html/sample.com/forum/jscripts/general.js:                 $("quick_login").innerHTML = "";
/var/www/html/sample.com/forum/jscripts/general.js:                 $("quick_login").insert({ before: form });
/var/www/html/sample.com/forum/jscripts/general.js:                 $("quick_login_remember").setAttribute("checked", "checked");
/var/www/html/sample.com/forum/jscripts/general.js:                 $('quick_login_username').focus();

There it is Toungue
(2012-02-12, 12:04 AM)seeker Wrote: [ -> ]Try header_welcomeblock_guest again, I think it must be there.
Edit: It starts w/ <span id="quick_login"> , which I don't see in the CSS styles.
Do you have your own VPS or server? (Never mind)
Enter in PuTTY:
Code:
grep "quick_login" /var/www/html/sample.com/forum/jscripts

Thank you for the reply and the grep !
Normally need to download (or use most current backup download) all \forum and use windows 'search'.

Tried header_welcomeblock_guest, seems to only effect the initial welcome back display when homepage is opened.
After click on initial homepage login, then get login text fields for fill in user name and password, and unable to find a place to modify that display per the previous attached scrnshot.

From grep, looks like /forum/jscripts/general.js is the place ?
Find there...
	quickLogin: function()
	{		
		if($("quick_login"))
		{
			var form = new Element("form", { method: "post", action: "member.php" });
			form.insert({ bottom: new Element("input",
				{
					name: "action",
					type: "hidden",
					value: "do_login"
				})
			});

			if(document.location.href)
			{
				form.insert({ bottom: new Element("input",
					{
						name: "url",
						type: "hidden",
						value: this.HTMLchars(document.location.href)
					})
				});
			}

			form.insert({ bottom: new Element("input",
				{
					name: "quick_login",
					type: "hidden",
					value: "1"
				})
			});

			form.insert({ bottom: new Element("input",
				{
					name: "quick_username",
					id: "quick_login_username",
					type: "text",
					value: lang.username,
					"class": "textbox",
					onfocus: "if(this.value == '"+lang.username+"') { this.value=''; }",
					onblur: "if(this.value == '') { this.value='"+lang.username+"'; }"
				})
			}).insert({ bottom: "&nbsp;" });

			form.insert({ bottom: new Element("input",
				{
					name: "quick_password",
					id: "quick_login_password",
					type: "password",
					value: lang.password,
					"class": "textbox",
					onfocus: "if(this.value == '"+lang.password+"') { this.value=''; }",
					onblur: "if(this.value == '') { this.value='"+lang.password+"'; }"
				})
			}).insert({ bottom: "&nbsp;" });

			form.insert({ bottom: new Element("input",
				{
					name: "submit",
					type: "submit",
					value: lang.login,
					"class": "button"
				})
			});

			var span = new Element("span", { "class": "remember_me" }).insert({ bottom: new Element("input",
				{
					name: "quick_remember",
					id: "quick_login_remember",
					type: "checkbox",
					value: "yes",
					"class": "checkbox"
				})
			});

			span.innerHTML += "<label for=\"quick_login_remember\"> "+lang.remember_me+"</label>";
			form.insert({ bottom: span });

			form.innerHTML += lang.lost_password+lang.register_url;
	
			$("quick_login").innerHTML = "";
			$("quick_login").insert({ before: form });

			$("quick_login_remember").setAttribute("checked", "checked");
			$('quick_login_username').focus();
		}

		return false;
	}
};

Assume that is where need to make modifications ?
At this point have no idea what am doing in terms of modifying code.
Never dealt with *.js files.
Guess main question is... is it possible to make the edit needed to achieve the scrnshot display... ie insert text field under text boxes ?
If so, then will start doing the T&E and searching for how to do.
Any suggestions on places to browse for info related to *.js and this question ?

Ps: Looks like specific code from above may be...
			form.insert({ bottom: new Element("input",
				{
					name: "quick_login",
					type: "hidden",
					value: "1"
				})
			});

			form.insert({ bottom: new Element("input",
				{
					name: "quick_username",
					id: "quick_login_username",
					type: "text",
					value: lang.username,
					"class": "textbox",
					onfocus: "if(this.value == '"+lang.username+"') { this.value=''; }",
					onblur: "if(this.value == '') { this.value='"+lang.username+"'; }"
				})
			}).insert({ bottom: "&nbsp;" });

			form.insert({ bottom: new Element("input",
				{
					name: "quick_password",
					id: "quick_login_password",
					type: "password",
					value: lang.password,
					"class": "textbox",
					onfocus: "if(this.value == '"+lang.password+"') { this.value=''; }",
					onblur: "if(this.value == '') { this.value='"+lang.password+"'; }"
				})
			}).insert({ bottom: "&nbsp;" });
?

Not sure, if it is right place, how to edit, but maybe some T&E.

Another quick thought...
How to get from... /general.js
	quickLogin: function()
	{		
		if($("quick_login"))
		{
			var form = new Element("form", { method: "post", action: "member.php" });
			form.insert({ bottom: new Element("input",


to /member.php
if($mybb->input['action'] == "do_login" && $mybb->request_method == "post")
{
	$plugins->run_hooks("member_do_login_start");
	
	// Checks to make sure the user can login; they haven't had too many tries at logging in.
	// Is a fatal call if user has had too many tries
	$logins = login_attempt_check();
	$login_text = '';
	
	// Did we come from the quick login form
	if($mybb->input['quick_login'] == "1" && $mybb->input['quick_password'] && $mybb->input['quick_username'])

...and display the 'long form' login display (scrnshot attached) as the default login display form?

Ps: Seems like have done above by commenting out //* */ the /forum/jscripts/general.js code.
Maybe no more to do ?
Guess wait and see of keeps if working.

(2012-02-12, 11:29 PM)akm Wrote: [ -> ]....
Thank you for the reply and the grep !
...

Sure, you are welcome.
I don't know much javascript yet, maybe someone else can help more with that part.
(2012-02-13, 06:23 AM)seeker Wrote: [ -> ]
(2012-02-12, 11:29 PM)akm Wrote: [ -> ]....
Thank you for the reply and the grep !
...
Sure, you are welcome.
I don't know much javascript yet, maybe someone else can help more with that part.

The question rolls on.
When omit shortform login, admin forum mgmt buttons do not work.
Posted related thread at...
http://community.mybb.com/thread-113414.html
Guess if want longform login only, will need to go back and forth to general.js b4 can use ACP.
Not a great answer, but will keep looking.