How Long Has Your Blog Been Up?

With the latest release of my Countdown plugin, I had a neat idea that I figured I'd share with everyone.

So, here's a quick way to display how long your blog has been around, with the Countdown and Entry plugins:

This blog has been up for <MTEntry id="1">
<MTCountup date="[MTEntryDate format='%Y-%m-%d %H:%M:%S']">
<MTCountupIfYears>
<MTCountupYears> years, 
</MTCountupIfYears>
<MTCountupIfWeeks>
<MTCountupWeeks> weeks, 
</MTCountupIfWeeks>
<MTCountupIfDays>
<MTCountupDays> days,
</MTCountupIfDays>
<MTCountupIfMinutes>
<MTCountupMinutes> minutes,
</MTCountupIfMinutes>
<MTCountupIfSeconds>
<MTCountupSeconds> seconds
</MTCountupIfSeconds>
</MTCountup>
</MTEntry>

Obviously you do not have to use the Entry plugin, you just need a way to select the first entry in your blog. I recall seeing a way to do it with the SQL plugin, but I think this way just looks cleaner. Or maybe I am just weird. :)

It could also be trimmed down quite a bit too. You do not have to use all the MTCountupIf tags like I did.

3 TrackBacks

There have been a lot of changes here recently, most of them on the back-end. Most of this work was related to having a bilingual (English and Urdu) blog along with MathML equations. This required valid XHTML 1.1 and serving... Read More

Thanks to the Countdown plugin for Movable Type this blog now features an uptime statistic on the sidebar.... Read More

David Raynes: How Long Has Your Blog Been Up?... Read More

2 Comments

this is a great plugin!! is there any way to put months in there as well?

where is MTCountupIfHours?

Leave a comment

Recent Entries

  • Plugin Writing 101

    So, I’m planning on writing up some entries about various aspects of plugin development. While I have a couple topics already in mind, I thought...

  • The Olympics Make Me Want To Compete Again

    Every time the Olympics come around (most the summer ones) I always start to delude myself into thinking I could complete once again in the...

  • Minimalist plugins are fun!

    Last night I whipped up one of the smallest plugins I’ve ever written. It is so small in fact that I was able to stuff...

  • Feedburner Widget on MT News

    Movable Type News A WordPress 2.5 Upgrade Guide: And of course there are lots of third-party plugins for the MT dashboard, to integrate statistics and...

  • AD&D Monster Stats for the Presidential Canditates

    Charles Stross (scifi author, D&D nerd, and former perl columnist) posted Politics as she is Played with 3d6: The recent death of Gary Gygax, who...

Close