Maybe you can try something like this?
Add this to the vbcode.js file in your forum directory
Code:
// ************************************
function countdownup(theform,thetype) {
// inserts countdown or countup
maintext = prompt("Enter Top Message for " + thetype,"");
coloredtext = prompt("Enter the color to use for the Top Message","BLUE");
datetext = prompt("Enter Date for " + thetype,"");
var prompttext;
if (thetype == "countdown") {
prompt_text = "Enter text to display when Countdown reaches zero";
}
else {
prompt_text = "Enter text to display before Countup starts (future date)";
}
expiredtext = prompt(prompt_text,"");
if ((datetext != null) && (datetext != "")) {
cdcode = "";
if ((maintext == null) || (maintext == "")) {
if (thetype == "countdown") {
maintext = "My Countdown";
}
else {
maintext = "My Countup";
}
}
if ((coloredtext == null) || (coloredtext == ""))
coloredtext = "BLUE";
if ((expiredtext == null) || (expiredtext == "")) {
if (thetype == "countdown") {
expiredtext = "Blast Off!";
}
else {
expiredtext = "Waiting to Start";
}
}
theform.message.value += "["+thetype+"="+datetext+";"+expiredtext+";"+coloredtext+"]"+maintext+"[/"+thetype+"] ";
}
theform.message.focus();
}
// *************************************
Then add the buttons to your vbcode_buttons template:
My template looks like this after adding them after the "quote" button. This was added after the <BR> tag which puts them on the third line of buttons.
Code:
<input type="button" class="bginput" value="countdown" title="Insert Countdown" onclick="countdownup(this.form,'countdown')" >
<input type="button" class="bginput" value="countup" title="Insert Countdown" onclick="countdownup(this.form,'countup')" ><br>