scriptygoddess RSS Feed
 
 
 
 

Autodetect calendar date

The Movable Type calendar currently features an option to have the current day highlighted by use of the MTCalendarIfToday tag. But this tag is not dynamic, it only refreshes the information on the rebuild of your calendar template. If you'd like this to work automatically with php to autodetect the date (within the same month), I put together a tutorial with code to copy and paste. Movable Type: Calendar using PHP to autodetect date. Hope this helps someone, its been an oft-requested option on the MTForums!

6 Responses to “Autodetect calendar date”

  1. 1
    lynda:

    Awesome. Very simple and effective way to make MT more dynamic. :)

  2. 2
    Donna:

    Very cool, Kristine! I wonder if this would work with Dawn's events calendar?

  3. 3
    Carla:

    I'm having a hard time visualizing this, are there any examples out there?

  4. 4
    Kristine:

    Donna - since the color rotating is directly based on Dawn's original idea, I'm pretty sure that it would work well with her event calendar :)
    Carla - All its doing is highlighting the cell of the table if it REALLY is today. So people who don't update every day can still have their calendar show "today" highlighted. I'm gonna put this mod on my calendar soon, and then I'll make sure to point it out :)

  5. 5
    Louis:

    Hi,

    Just trying out the calendar you mentioned. I am putting the code for the actual calendar in a new index template as you suggested but I am having trouble rebuilding the calendar template! The error is

    Parse error in template 'cal.php': with no

    I guess MT is having problem understanding the PHP? Am I doing something wrong here?

    Thanks!

  6. 6
    Louis:

    Ooops! Just realised the error message I posted was chopped off.

    The full error is

    Parse error in template 'cal.php':
    'MTCalendarIfEntries' with no '/MTCalendarIfEntries'

Bookmarks

WordPress Resources

Meta

Random Stuff