[ SOLVED] Omit quickform login & make longform login default ???
akm Offline
Member
***
Posts: 115
Joined: Nov 2011
Post: #4
RE: 'general.js' mod to omit shortform login, now buttons not working ???
Followup...
Tried Firebug and seems took right to problem... showed something wrong in 'general.js' !
Had commented out section of 'general.js' (code below) to make only 'longform login' display be the default login display, for various reasons (scnshot attached).
Thought it only effected ACP buttons, but no such luck, guess it also effected thread reply display buttons.

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
quickLogin: function()
	{	
		// omit quickLogin code below for make longform login standard at forum, but need to un-omit to make ACP forum management buttons and other forum display buttons work
		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: "Username " });

			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: "Password " });

			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;  
		// put comment out here for above code to display only longform login, but get button problems at ACP and thread reply display
	} 
};


Ps:  Just decided to look again at templates... after hundreds of other looks.
Commented out Edit Template: loginbox, and bingo, shortform login display went away !
Must be learning something from this forum !  Oops

Ps: Still have red files list at ACP ยป File Verification/Checking...
File Verification: Found Problems (including 'general.js', but maybe will eventually figure out if keep messing with ?   Smile



Attached File(s) Thumbnail(s)
   

Thanks again for your help !
02-20-2012 06:02 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread

 Standard Tools
Forum Jump: