Greetings --
I've been holding off my organization's upgrade to MT4 because I was hoping ScatterNation's DateTags would someday get upgraded. Sadly, it looks like that's not going to happen. So before I can make the now-urgently needed upgrade to MT4, I need to figure out the most efficient way to recreate the calendar of events page, which was dependent on that tag.
In our current setup, we use DateTags show the next 12 months' worth of entries, starting with the first day of the current month. There was a header for each month, showing the month's name, and a footer, which was just a gap in the layout. Like this:
JUNE 12 Event 1 14 Event 2 14 Event 3 21 Event 4JULY
[...]
Each event in the calendar is an entry unto itself, with the date of the entry set to the date of the event. Some days will have more than one entry; most days will have no entry at all.
How do I do the same using the standard MT4 tags? Use MT:Calendar somehow, with a loop that runs 12 times and increments the month shown? I'm afraid I'm kind of at a loss here.
Many thanks for any help y'all can offer.
Reported on Movable Type 4.2
So have you tried DateTags and found that it doesn't work with MT4? Most MT3 plugins work just fine with MT4.
I saw this the other day, which may help you think in template tags about your problem: Publish only entries with dates (in) the future or past.
Thanks, Dan, for suggesting I just give it a go anyway. When it first appeared on the "not yet compatible" list on the Works with MT4 page, I took it at face value -- but lo and behold! It sort of works with MT4.2! (The DateRange tag, allowing for arbitrary start and end dates for entry printout, works. The MonthHeader and MonthFooter tags don't seem to work, which is a shame.)
I'll look at the link that shenews provided with interest (my thanks), but in the mean time, here's the code we'll use for our calendar of events, in case it's useful to anyone else. In the absence of the DateTags function, I had to roll my own header/footer for each month's worth of entries.
Hi Andrew -
Though not as robust as Kevin's DateTags, the MT-SomeDays plugin works should work with MT4 (just make sure you get the most recent version): http://everitz.com/mt/somedays/index.php
Never did thank you for pointing me at MT-SomeDays. It works just fine in MT 4 -- all of its tags, rather than just some of them -- and although it's a couple seconds slower on the page rebuild it let me write much less kludgy code. So thanks!
For the benefit of future seekers: Chad Everett was correct, and MT-SomeDays also worked with MT4. As far as I could tell, SomeDays is slower: it added a couple of seconds to each rebuild of the page, but it also gave me clear, easy month headers and footers, rather than my having to create and compare all those variables. Much cleaner, more elegant code, which will make life easier for future maintainers of our website. The calendar code using SomeDays looked like this:
Note that SomeDays tags don't parse in MT 4 if you use the new mt:TagName syntax. Stick with the old-school stuff.