Vergleich jscripts/general.js - 1.6.2 - 1.6.17

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 107Zeile 107

if(confirmReturn == true)
{


if(confirmReturn == true)
{

			form = document.createElement("form");
form.setAttribute("method", "post");
form.setAttribute("action", "calendar.php");
form.setAttribute("style", "display: none;");

if(this.browser == "ie")
{
var input = document.createElement("<input name=\"action\">");
}
else
{
var input = document.createElement("input");
input.setAttribute("name", "action");
}
input.setAttribute("name", "action");
input.setAttribute("type", "hidden");
input.setAttribute("value", "do_editevent");
form.appendChild(input);

			var form = new Element("form", { method: "post", action: "calendar.php", style: "display: none;" });






















			if(my_post_key)
{
if(this.browser == "ie")
{
var input = document.createElement("<input name=\"my_post_key\">");
}
else

			form.insert({ bottom: new Element("input",







				{

				{

					var input = document.createElement("input");
input.setAttribute("name", "my_post_key");
}
input.setAttribute("type", "hidden");
input.setAttribute("value", my_post_key);
form.appendChild(input);
}

if(this.browser == "ie")
{
var input = document.createElement("<input name=\"eid\">");
}
else
{
var input = document.createElement("input");
input.setAttribute("name", "eid");
}
input.setAttribute("type", "hidden");
input.setAttribute("value", eid);
form.appendChild(input);

					name: "action",
type: "hidden",
value: "do_editevent"
})
});




















			if(this.browser == "ie")

			if(my_post_key)

			{

			{

				var input = document.createElement("<input name=\"delete\">");
}
else
{
var input = document.createElement("input");
input.setAttribute("name", "delete");


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

			}

			}

			input.setAttribute("type", "hidden");
input.setAttribute("value", 1);
form.appendChild(input);

 




			document.getElementsByTagName("body")[0].appendChild(form);

















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

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

$$("body")[0].insert({ bottom: form });

			form.submit();
}
},

			form.submit();
}
},

Zeile 204Zeile 180
		confirmReturn = confirm(delete_reputation_confirm);

if(confirmReturn == true)

		confirmReturn = confirm(delete_reputation_confirm);

if(confirmReturn == true)

		{
form = document.createElement("form");
form.setAttribute("method", "post");
form.setAttribute("action", "reputation.php?action=delete");
form.setAttribute("style", "display: none;");

if(this.browser == "ie")
{
var input = document.createElement("<input name=\"rid\">");
}
else
{
var input = document.createElement("input");
input.setAttribute("name", "rid");
}
input.setAttribute("type", "hidden");
input.setAttribute("value", rid);
form.appendChild(input);


		{
var form = new Element("form", { method: "post", action: "reputation.php?action=delete", style: "display: none;" });

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










			if(my_post_key)
{

			if(my_post_key)
{

				if(this.browser == "ie")
{
var input = document.createElement("<input name=\"my_post_key\">");
}
else
{
var input = document.createElement("input");
input.setAttribute("name", "my_post_key");
}
input.setAttribute("type", "hidden");
input.setAttribute("value", my_post_key);
form.appendChild(input);
}

if(this.browser == "ie")
{
var input = document.createElement("<input name=\"uid\">");
}
else
{
var input = document.createElement("input");
input.setAttribute("name", "uid");

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
















			}

			}

			input.setAttribute("type", "hidden");
input.setAttribute("value", uid);
form.appendChild(input);

document.getElementsByTagName("body")[0].appendChild(form);
form.submit();
}
},








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

$$("body")[0].insert({ bottom: form });
form.submit();
}
},


	whoPosted: function(tid)
{
MyBB.popupWindow("misc.php?action=whoposted&tid=" + tid, "whoPosted", 230, 300)

	whoPosted: function(tid)
{
MyBB.popupWindow("misc.php?action=whoposted&tid=" + tid, "whoPosted", 230, 300)

Zeile 265Zeile 223
	hopPage: function(tid, page, pages)
{
if(pages > 1)

	hopPage: function(tid, page, pages)
{
if(pages > 1)

		{

		{

			defpage = page + 1;
}
else
{
defpage = 1;

			defpage = page + 1;
}
else
{
defpage = 1;

		}

promptres = prompt("Quick Page Jump\nPlease enter a page number between 1 and "+pages+" to jump to.", defpage);


		}

promptres = prompt("Quick Page Jump\nPlease enter a page number between 1 and "+pages+" to jump to.", defpage);


		if((promptres != null) && (promptres != "") && (promptres > 1) && (promptres <= pages))
{
window.location = "showthread.php?tid="+tid+"&page"+promotres;

		if((promptres != null) && (promptres != "") && (promptres > 1) && (promptres <= pages))
{
window.location = "showthread.php?tid="+tid+"&page"+promotres;

		}
},


		}
},


	markForumRead: function(event)
{
element = Event.element(event);
if(!element)

	markForumRead: function(event)
{
element = Event.element(event);
if(!element)

		{
return false;

		{
return false;

		}
var fid = element.id.replace("mark_read_", "");
if(!fid)
{
return false;
}

		}
var fid = element.id.replace("mark_read_", "");
if(!fid)
{
return false;
}

		new Ajax.Request('misc.php?action=markread&fid='+fid+'&ajax=1', {method: 'get', onComplete: function(request) {MyBB.forumMarkedRead(fid, request); }});

		new Ajax.Request('misc.php?action=markread&fid='+fid+'&ajax=1&my_post_key='+my_post_key, {method: 'get', onComplete: function(request) {MyBB.forumMarkedRead(fid, request); }});

	},

forumMarkedRead: function(fid, request)

	},

forumMarkedRead: function(fid, request)

	{

	{

		if(request.responseText == 1)
{
$('mark_read_'+fid).src = $('mark_read_'+fid).src.replace("on.gif", "off.gif");

		if(request.responseText == 1)
{
$('mark_read_'+fid).src = $('mark_read_'+fid).src.replace("on.gif", "off.gif");

Zeile 315Zeile 273
		{
if(use_xmlhttprequest != 1 || !new Ajax.Request('misc.php?action=dstswitch&ajax=1', {method: 'post'})) // Ajax update failed? (No ajax support) Fake it
{

		{
if(use_xmlhttprequest != 1 || !new Ajax.Request('misc.php?action=dstswitch&ajax=1', {method: 'post'})) // Ajax update failed? (No ajax support) Fake it
{

				form = document.createElement("form");
form.setAttribute("method", "post");
form.setAttribute("action", "misc.php");
form.setAttribute("style", "display: none;");
if(this.browser == "ie")
{
var input = document.createElement("<input name=\"action\">");
}
else
{
var input = document.createElement("input");
input.setAttribute("name", "action");
}
input.setAttribute("type", "hidden");
input.setAttribute("value", "dstswitch");
form.appendChild(input);
document.getElementsByTagName("body")[0].appendChild(form);

				var form = new Element("form", { method: "post", action: "misc.php", style: "display: none;" });

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

$$("body")[0].insert({ bottom: form });







				form.submit();
}
}

				form.submit();
}
}

Zeile 361Zeile 313
		text = text.replace(/&nbsp;/g, " ");
text = text.replace(/&quot;/g, "\"");
text = text.replace(/&amp;/g, "&");

		text = text.replace(/&nbsp;/g, " ");
text = text.replace(/&quot;/g, "\"");
text = text.replace(/&amp;/g, "&");

		return text;
},

		return text;
},


HTMLchars: function(text)
{


HTMLchars: function(text)
{

Zeile 387Zeile 339
	{		
if($("quick_login"))
{

	{		
if($("quick_login"))
{

			var form = document.createElement("form");
form.setAttribute("method", "post");
form.setAttribute("action", "member.php");

if(this.browser == "ie")






			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)

			{

			{

				var input = document.createElement("<input name=\"action\">");
}
else
{
var input = document.createElement("input");
input.setAttribute("name", "action");
}

input.setAttribute("type", "hidden");
input.setAttribute("value", "do_login");
form.appendChild(input);

if(document.location.href)
{
if(this.browser == "ie")




				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",

				{

				{

					var input = document.createElement("<input name=\"url\">");
}
else









					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",

				{

				{

					var input = document.createElement("input");
input.setAttribute("name", "url");
}

input.setAttribute("type", "hidden");
input.setAttribute("value", this.HTMLchars(document.location.href));
form.appendChild(input);
}

if(this.browser == "ie")
{
var input = document.createElement("<input name=\"quick_login\">");
}
else
{
var input = document.createElement("input");
input.setAttribute("name", "quick_login");
}

input.setAttribute("type", "hidden");
input.setAttribute("value", "1");
form.appendChild(input);

if(this.browser == "ie")
{
var input = document.createElement("<input name=\"quick_username\">");
}
else
{
var input = document.createElement("input");
input.setAttribute("name", "quick_username");
}
input.setAttribute("type", "text");
input.setAttribute("value", lang.username);
input.setAttribute("class", "textbox");
input.setAttribute("onfocus", "if(this.value == '"+lang.username+"') { this.value=''; }");
input.setAttribute("onblur", "if(this.value == '') { this.value='"+lang.username+"'; }");
input.id = 'quick_login_username';
form.appendChild(input);
form.innerHTML += " ";

if(this.browser == "ie")
{
var input = document.createElement("<input name=\"quick_password\">");
}
else
{
var input = document.createElement("input");
input.setAttribute("name", "quick_password");
}
input.setAttribute("type", "password");
input.setAttribute("value", lang.password);
input.setAttribute("class", "textbox");
input.setAttribute("onfocus", "if(this.value == '"+lang.password+"') { this.value=''; }");
input.setAttribute("onblur", "if(this.value == '') { this.value='"+lang.password+"'; }");
form.appendChild(input);

form.innerHTML += " ";

if(this.browser == "ie")
{
var input = document.createElement("<input name=\"submit\">");
}
else
{
var input = document.createElement("input");
input.setAttribute("name", "submit");
}
input.setAttribute("type", "submit");
input.setAttribute("value", lang.login);
input.setAttribute("class", "button");
form.appendChild(input);

if(this.browser == "ie")
{
var span = document.createElement("<span class=\"remember_me\">");
}
else
{
var span = document.createElement("span");
span.setAttribute("class", "remember_me");
}
if(this.browser == "ie")
{
var input = document.createElement("<input name=\"quick_remember\">");
}
else
{
var input = document.createElement("input");
input.setAttribute("name", "quick_remember");
}
input.setAttribute("type", "checkbox");
input.setAttribute("checked", "checked");
input.setAttribute("value", "yes");
input.setAttribute("class", "checkbox");
input.id = 'quick_login_remember';
span.appendChild(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>";

			span.innerHTML += "<label for=\"quick_login_remember\"> "+lang.remember_me+"</label>";

			form.appendChild(span);


			form.insert({ bottom: span });


			form.innerHTML += lang.lost_password+lang.register_url;

			form.innerHTML += lang.lost_password+lang.register_url;

						

	

			$("quick_login").innerHTML = "";

			$("quick_login").innerHTML = "";

			$("quick_login").appendChild(form);



			$("quick_login").insert({ before: form });

$("quick_login_remember").setAttribute("checked", "checked");

			$('quick_login_username').focus();
}

			$('quick_login_username').focus();
}

		



		return false;
}
};

		return false;
}
};