MyBB Community Forums

Full Version: Triple posts annoying you?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Ever get tired of waiting for your thread to post on that laggy friends server of yours and end up impatientely repeatedly clicking the "Submit" button creating tons and tons of the same posts. Well now you dont have to worry!

Just open /jscripts/general.js and find:

function checkForm() {
	if(cancelForm == 1) {
		return false;
	} else {
		return true;
	}
}

and replace with

function checkForm() {
	if(cancelForm == 1) {
		return false;
	} else {
		document.input.submit.disabled = true;
		return true;
	}
}

Now go into your admin cp
Templates -> Modify / Delete -> <YOUR TEMPLATE HERE> -> Expand -> Show Thread Templates -> Expand -> showthread -> Edit / Change Original -> Find "<form method="post" action="newreply.php" name="input">", near the top,
and replace with "<form method="post" action="newreply.php" name="input" onsubmit="return checkForm();">".

And last but not least find "<input type="submit" class="submit" value="$lang->post_reply" tabindex="2" accesskey="s" />", near the bottom,
and replace with "<input type="submit" class="submit" name="submit" value="$lang->post_reply" tabindex="2" accesskey="s" />"



Now you wont be tempted to click that lil button of yours Smile