"Next Show Countdown"

  • Welcome to "The New" Wrestling Smarks Forum!

    I see that you are not currently registered on our forum. It only takes a second, and you can even login with your Facebook! If you would like to register now, pease click here: Register

    Once registered please introduce yourself in our introduction thread which can be found here: Introduction Board


Tzesi

The Artiste
Joined
Dec 18, 2011
Messages
753
Reaction score
14
Points
0
Put this code on the header

Code:
<script type="text/javascript">
//######################################################################################


dateFuture1 = new Date(2011,11,29,21,0,0);



//###################################
//nothing beyond this point
function GetCount(ddate,iid){

	dateNow = new Date();	//grab current date
	amount = ddate.getTime() - dateNow.getTime();	//calc milliseconds between dates
	delete dateNow;

	// if time is already past
	if(amount < 0){
		document.getElementById(iid).innerHTML="SmackDown is ON!";
	}
	// else date is still good
	else{
		days=0;hours=0;mins=0;secs=0;out="";

		amount = Math.floor(amount/1000);//kill the "milliseconds" so just secs

		days=Math.floor(amount/86400);//days
		amount=amount%86400;

		hours=Math.floor(amount/3600);//hours
		amount=amount%3600;

		mins=Math.floor(amount/60);//minutes
		amount=amount%60;

		secs=Math.floor(amount);//seconds

		out += days +" "+((days==1)?"day":"days")+", ";
		out += hours +" "+((hours==1)?"hour":"hours")+", ";
		out += mins +" "+((mins==1)?"min":"mins")+", ";
		out += secs +" "+((secs==1)?"sec":"secs")+", ";
		out = out.substr(0,out.length-2);
		document.getElementById(iid).innerHTML=out;

		setTimeout(function(){GetCount(ddate,iid)}, 1000);
	}
}

window.onload=function(){
	GetCount(dateFuture1, 'countbox1');
	
};
</script>
<div id="countbox1"></div>


Dates might be slightly off.
You will need to customize text color and size.
 

Lith

Jobber
Joined
Dec 19, 2011
Messages
236
Reaction score
9
Points
0
Crayo said:
No idea how you two saying "These plugins can take few hours" makes me jealous as fuck. Specially that notifications one, nothing like it in MyBB atm I don't think.

Notification one is simple but probably will be tedious, it might take a day, maybe 2.
 

Anonymous

The Artiste
Joined
Dec 16, 2011
Messages
326
Reaction score
22
Points
0
Lith said:
Notification one is simple but probably will be tedious, it might take a day, maybe 2.

I'd spend most of that time working on the ACP page, since I chose the observational route of learning plugin development as opposed to specifically looking for help, I'd need to look over everything MyBB (or other plugins) did. I guess that's another reason why I have slow progress; having to read over loads of code and piece your code together progressively as you learn isn't really fun and is pretty prone to error.

The rest of the time i'd be spending on the client side, making the notifications styling work on all browsers. All of the other stuff is just wrapping paper.

I added a hover logo setting to the ACP theme styles page in under 8 minutes* yesterday though, so I guess learning the structure of mybb code has its benefits.

I always have the problem of over-burdening myself with too many projects too, which means i just end up working on certain parts at certain times.

I think these problems are linked back to when my parents used to beat me.

* Not trying to gloat, it just really did take about 8 minutes.
 

Lith

Jobber
Joined
Dec 19, 2011
Messages
236
Reaction score
9
Points
0
Anonymous said:
I'd spend most of that time working on the ACP page, since I chose the observational route of learning plugin development as opposed to specifically looking for help, I'd need to look over everything MyBB (or other plugins) did. I guess that's another reason why I have slow progress; having to read over loads of code and piece your code together progressively as you learn isn't really fun and is pretty prone to error.

The rest of the time i'd be spending on the client side, making the notifications styling work on all browsers. All of the other stuff is just wrapping paper.

I added a hover logo setting to the ACP theme styles page in under 8 minutes* yesterday though, so I guess learning the structure of mybb code has its benefits.

I always have the problem of over-burdening myself with too many projects too, which means i just end up working on certain parts at certain times.

I think these problems are linked back to when my parents used to beat me.

* Not trying to gloat, it just really did take about 8 minutes.

:-/

You think you know how I learned to code by looking at my habits which show how I do code. And piece my code together? I don't understand what that means at all because I usually don't show people my code unless I'm helping them with something.
 

Anonymous

The Artiste
Joined
Dec 16, 2011
Messages
326
Reaction score
22
Points
0
Lith said:
:-/

You think you know how I learned to code by looking at my habits which show how I do code. And piece my code together? I don't understand what that means at all because I usually don't show people my code unless I'm helping them with something.

You missed the 'I', I was just narating over what I'd spend my time doing on that plugin. Wasn't really aimed at you or anything.

When I said you and your, I meant it figuratively. I guess I really meant to say my and mine but I'd just woken up when I posted that.
 

Lith

Jobber
Joined
Dec 19, 2011
Messages
236
Reaction score
9
Points
0
Anonymous said:
You missed the 'I', I was just narating over what I'd spend my time doing on that plugin. Wasn't really aimed at you or anything.

When I said you and your, I meant it figuratively. I guess I really meant to say my and mine but I'd just woken up when I posted that.

Oh, I see, because it was sort of weird sounding, I read over it a couple times and didn't really understand what you're saying completely.
 

Baxter2012

Jobber
Joined
Dec 23, 2011
Messages
5
Reaction score
0
Points
0
Age
38
Headlines is incorrect ................ A little ticker in the footer would be useful, ............